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.

47 lines
1.0 KiB

  1. /****************************Module*Header******************************\
  2. * Module Name: DLLENTRY.C
  3. *
  4. * Module Descripton: This file has dll management functions and global
  5. * variables used by MSCMS.DLL
  6. *
  7. * Warnings:
  8. *
  9. * Issues:
  10. *
  11. * Public Routines:
  12. *
  13. * Created: 18 March 1996
  14. * Author: Srinivasan Chandrasekar [srinivac]
  15. *
  16. * Copyright (c) 1996, 1997 Microsoft Corporation
  17. \***********************************************************************/
  18. #include "mscms.h"
  19. BOOL WINAPI
  20. DllEntryPoint(
  21. HINSTANCE hInstance,
  22. DWORD fdwReason,
  23. LPVOID lpvReserved
  24. )
  25. {
  26. switch (fdwReason)
  27. {
  28. case DLL_PROCESS_ATTACH:
  29. //
  30. // Not nessesary to call me for DLL_THREAD_ATTACH and DLL_THREAD_DETACH
  31. //
  32. DisableThreadLibraryCalls(hInstance);
  33. InitializeCriticalSection(&critsec);
  34. break;
  35. case DLL_PROCESS_DETACH:
  36. DeleteCriticalSection(&critsec);
  37. break;
  38. default:
  39. break;
  40. }
  41. return(TRUE);
  42. }