28 lines
704 B
C++
28 lines
704 B
C++
#include "Stdafx.h"
|
|
#include <Afxdllx.h>
|
|
#include "ModuleManagerHead.h"
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//¾²Ì¬±äÁ¿
|
|
static AFX_EXTENSION_MODULE ModuleManagerDLL={NULL,NULL};
|
|
|
|
//È«¾Öº¯Êý
|
|
extern "C" INT APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
|
{
|
|
UNREFERENCED_PARAMETER(lpReserved);
|
|
if (dwReason==DLL_PROCESS_ATTACH)
|
|
{
|
|
if (!AfxInitExtensionModule(ModuleManagerDLL,hInstance)) return 0;
|
|
new CDynLinkLibrary(ModuleManagerDLL);
|
|
}
|
|
else if (dwReason==DLL_PROCESS_DETACH)
|
|
{
|
|
AfxTermExtensionModule(ModuleManagerDLL);
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|