extern "C" EXPORT YourExportedFunction( );
AFX_MANAGE_STATE(AfxGetStaticModuleState( ))
BOOL APIENTRY DllMain(HANDLE hModule,DWord ul_reason_for_call,LPVOID lPReserved)
{
switch( ul_reason_for_call )
{
case DLL_PROCESS_ATTACH:
.......
case DLL_THREAD_ATTACH:
.......
case DLL_THREAD_DETACH:
.......
case DLL_PROCESS_DETACH:
.......
}
return TRUE;
}
BOOL WINAPI APIENTRY DLLMain(HINSTANCE hinstDll,DWORD reason ,LPVOID flmpload)
{
switch(reason)
{
……………//初始化代码;
}
return true;
}
新闻热点
疑难解答