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.

41 lines
805 B

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