-
Notifications
You must be signed in to change notification settings - Fork 651
/
Copy pathdlltest.c
36 lines (30 loc) · 853 Bytes
/
dlltest.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#define WIN32_LEAN_AND_MEAN
#define UNICODE
#include <windows.h>
#include "donut.h"
#pragma comment(lib, "user32.lib")
__declspec(dllexport)
VOID APIENTRY DonutApiVoid(VOID) {
MessageBoxA(NULL, "Hello, World!", "Donut Test for VOID API", MB_OK);
}
__declspec(dllexport)
VOID APIENTRY DonutApiW(PWCHAR argv) {
MessageBoxW(NULL, argv, L"Donut Test for UNICODE strings", MB_OK);
}
__declspec(dllexport)
VOID APIENTRY DonutApiA(PCHAR argv) {
MessageBoxA(NULL, argv, "Donut Test for ANSI strings", MB_OK);
}
__declspec(dllexport)
BOOL APIENTRY DllMain(HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved) {
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}