ReactOS
0.4.16-dev-197-g92996da
DllMain.c
Go to the documentation of this file.
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
}
dwReason
DWORD dwReason
Definition:
misc.cpp:141
TRUE
#define TRUE
Definition:
types.h:120
DLL_PROCESS_ATTACH
#define DLL_PROCESS_ATTACH
Definition:
compat.h:131
DLL_PROCESS_DETACH
#define DLL_PROCESS_DETACH
Definition:
compat.h:130
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
void
Definition:
nsiface.idl:2307
LdrDisableThreadCalloutsForDll
NTSTATUS NTAPI LdrDisableThreadCalloutsForDll(_In_ PVOID BaseAddress)
Definition:
ldrapi.c:1154
rtltypes.h
DllMain
BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
Definition:
DllMain.c:26
RtlpCloseKeyedEvent
VOID NTAPI RtlpCloseKeyedEvent(VOID)
Definition:
condvar.c:468
RtlpInitializeKeyedEvent
VOID NTAPI RtlpInitializeKeyedEvent(VOID)
Definition:
condvar.c:460
NTAPI
#define NTAPI
Definition:
typedefs.h:36
umfuncs.h
winbase.h
windef.h
WINAPI
#define WINAPI
Definition:
msvc.h:6
winreg.h
winuser.h
winwlx.h
dll
ntdll
nt_0600
DllMain.c
Generated on Wed Oct 30 2024 06:03:25 for ReactOS by
1.9.6