2017-05-30 21:35:05 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
|
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winreg.h>
|
|
|
|
#include <winuser.h>
|
|
|
|
#include <winwlx.h>
|
2017-06-05 21:37:13 +00:00
|
|
|
#include <ndk/rtltypes.h>
|
|
|
|
#include <ndk/umfuncs.h>
|
2017-05-30 21:35:05 +00:00
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
VOID
|
2023-08-12 16:33:46 +00:00
|
|
|
NTAPI
|
2017-05-30 21:35:05 +00:00
|
|
|
RtlpInitializeKeyedEvent(VOID);
|
|
|
|
|
|
|
|
VOID
|
2023-08-12 16:33:46 +00:00
|
|
|
NTAPI
|
2017-05-30 21:35:05 +00:00
|
|
|
RtlpCloseKeyedEvent(VOID);
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
WINAPI
|
|
|
|
DllMain(HANDLE hDll,
|
|
|
|
DWORD dwReason,
|
|
|
|
LPVOID lpReserved)
|
|
|
|
{
|
|
|
|
if (dwReason == DLL_PROCESS_ATTACH)
|
|
|
|
{
|
2017-06-05 21:37:13 +00:00
|
|
|
LdrDisableThreadCalloutsForDll(hDll);
|
2017-05-30 21:35:05 +00:00
|
|
|
RtlpInitializeKeyedEvent();
|
|
|
|
}
|
|
|
|
else if (dwReason == DLL_PROCESS_DETACH)
|
|
|
|
{
|
|
|
|
RtlpCloseKeyedEvent();
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|