Skip to content

Commit bb848d0

Browse files
authored
Update hello_dll.c
1 parent bb7d3a8 commit bb848d0

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

tests/hello_dll.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
//+---------------------------------------------------------------------------
2-
//
3-
// HELLO_DLL.C - Windows DLL example - main application part
4-
//
1+
//-----------------------------------------------------------------------------
2+
// HELLO_DLL.C - Windows DLL example - Main Application Entry Point
3+
//-----------------------------------------------------------------------------
54

65
#include <windows.h>
7-
86
#include "../include/obfus.h"
97

8+
// Function prototype for DLL function
109
void hello_func(void);
10+
11+
// Import external constant defined in the DLL
1112
__declspec(dllimport) extern const char *hello_data;
1213

14+
// Entry point for the Windows application
1315
int WINAPI WinMain(
1416
HINSTANCE hInstance,
1517
HINSTANCE hPrevInstance,
1618
LPSTR lpCmdLine,
17-
int nCmdShow) {
19+
int nCmdShow)
20+
{
21+
// Set the shared DLL data to a greeting message
1822
hello_data = "Hello World!";
23+
24+
// Call the DLL's function to display or process the message
1925
hello_func();
26+
27+
// Exit the application
2028
return 0;
2129
}

0 commit comments

Comments
 (0)