windows-nt/Source/XPSP1/NT/ds/netapi/svcdlls/lls/ntlsapi/main.c
2020-09-26 16:20:57 +08:00

55 lines
898 B
C

/*++ BUILD Version: 0001 // Increment this if a change has global effects
Copyright (c) 1994 Microsoft Corporation
Module Name:
main.c
Created:
20-Apr-1994
Revision History:
--*/
#include <nt.h>
#include <ntrtl.h>
#include <nturtl.h>
#include <windows.h>
#include <ntlsapi.h>
#include <malloc.h>
#include <lpcstub.h>
extern RTL_CRITICAL_SECTION LPCInitLock;
//
// DLL Startup code
//
BOOL WINAPI DllMain(
HANDLE hDll,
DWORD dwReason,
LPVOID lpReserved)
{
NTSTATUS status = STATUS_SUCCESS;
switch(dwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hDll);
status = LLSInitLPC();
break;
case DLL_PROCESS_DETACH:
LLSCloseLPC();
RtlDeleteCriticalSection(&LPCInitLock);
break;
} // end switch()
return NT_SUCCESS(status);
} // DllMain