Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
995 B

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. main.c
  5. Created:
  6. 20-Apr-1994
  7. Revision History:
  8. --*/
  9. #include <nt.h>
  10. #include <ntrtl.h>
  11. #include <nturtl.h>
  12. #include <windows.h>
  13. #include <ntlsapi.h>
  14. #include <malloc.h>
  15. #include <lpcstub.h>
  16. extern RTL_CRITICAL_SECTION LPCInitLock;
  17. //
  18. // DLL Startup code
  19. //
  20. BOOL WINAPI DllMain(
  21. HANDLE hDll,
  22. DWORD dwReason,
  23. LPVOID lpReserved)
  24. {
  25. NTSTATUS status = STATUS_SUCCESS;
  26. UNREFERENCED_PARAMETER(lpReserved);
  27. switch(dwReason)
  28. {
  29. case DLL_PROCESS_ATTACH:
  30. DisableThreadLibraryCalls(hDll);
  31. status = LLSInitLPC();
  32. break;
  33. case DLL_PROCESS_DETACH:
  34. LLSCloseLPC();
  35. RtlDeleteCriticalSection(&LPCInitLock);
  36. break;
  37. } // end switch()
  38. return NT_SUCCESS(status);
  39. } // DllMain