MFCdll 添加DLLMAIN
#include "stdafx.h"
#ifdef _X86_
extern "C" { int _afxForceUSRDLL; }
#else
extern "C" { int __afxForceUSRDLL; }
#endif
extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
switch( dwReason )
{
case DLL_PROCESS_ATTACH :
{
return TRUE;
}
case DLL_PROCESS_DETACH :
{
return TRUE;
}
case DLL_THREAD_ATTACH :
{
return TRUE;
}
case DLL_THREAD_DETACH :
{
return TRUE;
}
default : return TRUE;
}
}