28 lines
725 B
C++
28 lines
725 B
C++
#include "Stdafx.h"
|
|
#include "AfxDllx.h"
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//¾²Ì¬±äÁ¿
|
|
static AFX_EXTENSION_MODULE AndroidServiceDLL={NULL,NULL};
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//µ¼³öº¯Êý
|
|
extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
|
{
|
|
if (dwReason==DLL_PROCESS_ATTACH)
|
|
{
|
|
if (!AfxInitExtensionModule(AndroidServiceDLL, hInstance)) return 0;
|
|
new CDynLinkLibrary(AndroidServiceDLL);
|
|
}
|
|
else if (dwReason==DLL_PROCESS_DETACH)
|
|
{
|
|
AfxTermExtensionModule(AndroidServiceDLL);
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|