Source code of Windows XP (NT5)
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.

47 lines
1016 B

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996-1996
  5. //
  6. // File:
  7. //
  8. // Contents:
  9. //
  10. // History:
  11. //
  12. //---------------------------------------------------------------------------
  13. #include <windows.h>
  14. BOOL WINAPI _CRT_INIT(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved);
  15. void TLSShutdown();
  16. BOOL WINAPI DllMain(IN HINSTANCE hinstance,
  17. IN DWORD reason,
  18. IN LPVOID reserved)
  19. {
  20. switch(reason)
  21. {
  22. case DLL_PROCESS_ATTACH:
  23. if (!_CRT_INIT(hinstance, reason, reserved))
  24. {
  25. return(FALSE);
  26. }
  27. DisableThreadLibraryCalls(hinstance);
  28. break;
  29. case DLL_PROCESS_DETACH:
  30. TLSShutdown();
  31. if (!_CRT_INIT(hinstance, reason, reserved))
  32. {
  33. return(FALSE);
  34. }
  35. break;
  36. }
  37. return(TRUE);
  38. }