Source code of Windows XP (NT5)
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.

32 lines
681 B

  1. #include "stdafx.h"
  2. #include "resource.h"
  3. #include <initguid.h>
  4. #include "common.h"
  5. CComModule _Module;
  6. BEGIN_OBJECT_MAP(ObjectMap)
  7. END_OBJECT_MAP()
  8. /////////////////////////////////////////////////////////////////////////////
  9. // DLL Entry Point
  10. extern "C"
  11. BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  12. {
  13. lpReserved;
  14. if (dwReason == DLL_PROCESS_ATTACH)
  15. {
  16. _Module.Init(ObjectMap, hInstance);
  17. DisableThreadLibraryCalls(hInstance);
  18. InitErrorFunctionality();
  19. }
  20. else if (dwReason == DLL_PROCESS_DETACH)
  21. {
  22. TerminateErrorFunctionality();
  23. _Module.Term();
  24. }
  25. return TRUE; // ok
  26. }