ReactOS  0.4.14-dev-999-g61c8d34
dllmain.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS system libraries
4  * FILE: lib/advapi32/misc/dllmain.c
5  * PURPOSE: Library main function
6  * PROGRAMMER: ???
7  * UPDATE HISTORY:
8  * Created ???
9  */
10 
11 #include <advapi32.h>
12 
13 extern BOOL RegInitialize(VOID);
14 extern BOOL RegCleanup(VOID);
15 extern VOID UnloadNtMarta(VOID);
17 
18 BOOL
19 WINAPI
21  HINSTANCE hinstDll,
24 {
25  switch (dwReason)
26  {
27  case DLL_PROCESS_ATTACH:
28  DisableThreadLibraryCalls(hinstDll);
29  RegInitialize();
30  break;
31 
32  case DLL_PROCESS_DETACH:
34  RegCleanup();
35  UnloadNtMarta();
37  break;
38  }
39 
40  return TRUE;
41 }
42 
43 /* EOF */
#define TRUE
Definition: types.h:120
VOID CloseKsecDdHandle(VOID)
Definition: sysfunc.c:682
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
BOOL WINAPI DllMain(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved)
Definition: dllmain.c:52
DWORD dwReason
Definition: misc.cpp:154
unsigned int BOOL
Definition: ntddk_ex.h:94
r reserved
Definition: btrfs.c:2865
#define DLL_PROCESS_DETACH
Definition: compat.h:119
BOOL RegCleanup(VOID)
Definition: reg.c:93
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID UnloadNtMarta(VOID)
Definition: misc.c:116
NTSTATUS CloseLogonLsaHandle(VOID)
Definition: logon.c:75
BOOL RegInitialize(VOID)
Definition: reg.c:70