www.pudn.com > 大量windows shell编程例子.zip > WroxWiz.cpp
// WroxWiz.cpp : Defines the initialization routines for the DLL. // #include "stdafx.h" #include#include "WroxWiz.h" #include "WroxWizaw.h" #ifdef _PSEUDO_DEBUG #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif static AFX_EXTENSION_MODULE WroxWizDLL = { NULL, NULL }; extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { if (dwReason == DLL_PROCESS_ATTACH) { TRACE0("WROXWIZ.AWX Initializing!\n"); // Extension DLL one-time initialization AfxInitExtensionModule(WroxWizDLL, hInstance); // Insert this DLL into the resource chain new CDynLinkLibrary(WroxWizDLL); // Register this custom AppWizard with MFCAPWZ.DLL SetCustomAppWizClass(&WroxWizaw); } else if (dwReason == DLL_PROCESS_DETACH) { TRACE0("WROXWIZ.AWX Terminating!\n"); // Terminate the library before destructors are called AfxTermExtensionModule(WroxWizDLL); } return 1; // ok }