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.

34 lines
680 B

  1. #include "pch.h"
  2. #include "migrate.h"
  3. HINSTANCE g_hInstance = NULL;
  4. STDAPI_(BOOL) DllMain(HANDLE hDll, DWORD dwReason, void *lpReserved)
  5. {
  6. switch (dwReason)
  7. {
  8. case DLL_PROCESS_ATTACH:
  9. // Open log; FALSE means do not delete existing log
  10. SetupOpenLog(FALSE);
  11. g_hInstance = (HINSTANCE)hDll;
  12. break;
  13. case DLL_PROCESS_DETACH:
  14. if (g_lpNameBuf)
  15. LocalFree(g_lpNameBuf);
  16. if (g_lpWorkingDir)
  17. LocalFree(g_lpWorkingDir);
  18. if (g_lpSourceDirs)
  19. LocalFree(g_lpSourceDirs);
  20. SetupCloseLog();
  21. break;
  22. default:
  23. break;
  24. }
  25. return TRUE;
  26. }