【求助】为什么这个dll可以在到达入口点之前就能跑起来了?
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
{
//首次加载DLL时从此处执行
//当然,这里你可以开一个线程
hInstance=(HINSTANCE)hModule;
MessageBox(NULL,"Test!","[DLL加载]参数测试!",MB_OK);
break;
}
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
//做一些善后工作,如释放内存
break;
case DLL_PROCESS_DETACH:
//善后
break;
}
return TRUE;
}
一直都看不懂,帮忙解答下好吗?谢谢~~