1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS system libraries 4 * FILE: lib/secur32/lsa.c 5 * PURPOSE: Client-side LSA functions 6 * UPDATE HISTORY: 7 * Created 05/08/00 8 */ 9 10 #include "precomp.h" 11 12 VOID LsapInitLsaPort(VOID); 13 VOID LsapCloseLsaPort(VOID); 14 15 /* GLOBALS *******************************************************************/ 16 17 HANDLE Secur32Heap; 18 19 /* FUNCTIONS *****************************************************************/ 20 21 #ifdef __REACTOS__ 22 // See sspi.c 23 extern void SECUR32_freeProviders(void); 24 #endif 25 26 BOOL 27 WINAPI 28 DllMain(HINSTANCE hInstance, 29 ULONG Reason, 30 PVOID Reserved) 31 { 32 switch (Reason) 33 { 34 case DLL_PROCESS_ATTACH: 35 Secur32Heap = RtlCreateHeap(0, NULL, 0, 4096, NULL, NULL); 36 if (Secur32Heap == 0) 37 { 38 return FALSE; 39 } 40 LsapInitLsaPort(); 41 break; 42 43 case DLL_PROCESS_DETACH: 44 #ifdef __REACTOS__ 45 SECUR32_freeProviders(); 46 #endif 47 LsapCloseLsaPort(); 48 if (!RtlDestroyHeap(Secur32Heap)) 49 { 50 return FALSE; 51 } 52 break; 53 } 54 55 return TRUE; 56 } 57