xref: /reactos/dll/ntdll/nt_0600/DllMain.c (revision 864aed6b)
1 #include <stdarg.h>
2 
3 #define WIN32_NO_STATUS
4 
5 #include <windef.h>
6 #include <winbase.h>
7 #include <winreg.h>
8 #include <winuser.h>
9 #include <winwlx.h>
10 #include <ndk/rtltypes.h>
11 #include <ndk/umfuncs.h>
12 
13 #define NDEBUG
14 #include <debug.h>
15 
16 VOID
17 NTAPI
18 RtlpInitializeKeyedEvent(VOID);
19 
20 VOID
21 NTAPI
22 RtlpCloseKeyedEvent(VOID);
23 
24 BOOL
25 WINAPI
26 DllMain(HANDLE hDll,
27         DWORD dwReason,
28         LPVOID lpReserved)
29 {
30     if (dwReason == DLL_PROCESS_ATTACH)
31     {
32         LdrDisableThreadCalloutsForDll(hDll);
33         RtlpInitializeKeyedEvent();
34     }
35     else if (dwReason == DLL_PROCESS_DETACH)
36     {
37         RtlpCloseKeyedEvent();
38     }
39     return TRUE;
40 }
41