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.

36 lines
703 B

  1. //
  2. // dllmain.cpp
  3. //
  4. // DllMain module entry point.
  5. //
  6. #include "globals.h"
  7. //+---------------------------------------------------------------------------
  8. //
  9. // DllMain
  10. //
  11. //----------------------------------------------------------------------------
  12. BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID pvReserved)
  13. {
  14. switch (dwReason)
  15. {
  16. case DLL_PROCESS_ATTACH:
  17. g_hInst = hInstance;
  18. if (!InitializeCriticalSectionAndSpinCount(&g_cs, 0))
  19. return FALSE;
  20. break;
  21. case DLL_PROCESS_DETACH:
  22. DeleteCriticalSection(&g_cs);
  23. break;
  24. }
  25. return TRUE;
  26. }