2020-09-30 16:53:55 +02:00

57 lines
995 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;
UNREFERENCED_PARAMETER(lpReserved);
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