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.

43 lines
1.0 KiB

  1. // File: nmdll.cpp
  2. #include "precomp.h"
  3. ///////////////////////////////////////////////////////////////////////////
  4. // Globals
  5. HINSTANCE g_hInst = NULL;
  6. ///////////////////////////////////////////////////////////////////////////
  7. /* D L L M A I N */
  8. /*-------------------------------------------------------------------------
  9. %%Function: DllMain
  10. -------------------------------------------------------------------------*/
  11. BOOL WINAPI DllMain(HINSTANCE hDllInst, DWORD fdwReason, LPVOID lpv)
  12. {
  13. switch (fdwReason)
  14. {
  15. case DLL_PROCESS_ATTACH:
  16. {
  17. g_hInst = hDllInst;
  18. DisableThreadLibraryCalls(hDllInst);
  19. DbgInitZones();
  20. DBG_INIT_MEMORY_TRACKING(hDllInst);
  21. TRACE_OUT(("*** NMCOM.DLL: Attached process thread %X", GetCurrentThreadId()));
  22. break;
  23. }
  24. case DLL_PROCESS_DETACH:
  25. TRACE_OUT(("*** NMCOM.DLL: Detaching process thread %X", GetCurrentThreadId()));
  26. DBG_CHECK_MEMORY_TRACKING(hDllInst);
  27. DbgFreeZones();
  28. break;
  29. default:
  30. break;
  31. }
  32. return TRUE;
  33. }