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.

40 lines
957 B

  1. // Extensions.cpp : Defines the initialization routines for the DLL.
  2. //
  3. #include "stdafx.h"
  4. #include <afxdllx.h>
  5. #include "Ext.h"
  6. #include "Extaw.h"
  7. #ifdef _PSEUDO_DEBUG
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. static AFX_EXTENSION_MODULE ExtensionsDLL = { NULL, NULL };
  12. extern "C" int APIENTRY
  13. DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  14. {
  15. if (dwReason == DLL_PROCESS_ATTACH)
  16. {
  17. TRACE0("EXTENSIONS.AWX Initializing!\n");
  18. // Extension DLL one-time initialization
  19. AfxInitExtensionModule(ExtensionsDLL, hInstance);
  20. // Insert this DLL into the resource chain
  21. new CDynLinkLibrary(ExtensionsDLL);
  22. // Register this custom AppWizard with MFCAPWZ.DLL
  23. SetCustomAppWizClass(&Extensionsaw);
  24. }
  25. else if (dwReason == DLL_PROCESS_DETACH)
  26. {
  27. TRACE0("EXTENSIONS.AWX Terminating!\n");
  28. // Terminate the library before destructors are called
  29. AfxTermExtensionModule(ExtensionsDLL);
  30. }
  31. return 1; // ok
  32. }