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 RtlpInitializeKeyedEvent(VOID); 18 19 VOID 20 RtlpCloseKeyedEvent(VOID); 21 22 BOOL 23 WINAPI 24 DllMain(HANDLE hDll, 25 DWORD dwReason, 26 LPVOID lpReserved) 27 { 28 if (dwReason == DLL_PROCESS_ATTACH) 29 { 30 LdrDisableThreadCalloutsForDll(hDll); 31 RtlpInitializeKeyedEvent(); 32 } 33 else if (dwReason == DLL_PROCESS_DETACH) 34 { 35 RtlpCloseKeyedEvent(); 36 } 37 return TRUE; 38 } 39