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 WINE_DEFAULT_DEBUG_CHANNEL(advapi); 13 14 extern BOOL RegInitialize(VOID); 15 extern BOOL RegCleanup(VOID); 16 extern VOID UnloadNtMarta(VOID); 17 extern VOID CloseKsecDdHandle(VOID); 18 19 BOOL 20 WINAPI 21 DllMain( 22 HINSTANCE hinstDll, 23 DWORD dwReason, 24 LPVOID reserved) 25 { 26 switch (dwReason) 27 { 28 case DLL_PROCESS_ATTACH: 29 DisableThreadLibraryCalls(hinstDll); 30 RegInitialize(); 31 break; 32 33 case DLL_PROCESS_DETACH: 34 CloseLogonLsaHandle(); 35 RegCleanup(); 36 UnloadNtMarta(); 37 CloseKsecDdHandle(); 38 break; 39 } 40 41 return TRUE; 42 } 43 44 /* EOF */ 45