鍩轰簬MFC鐨勫簲鐢ㄧ殑CAppModule鍦╠ebug妯″紡涓嬪惎鍔ㄥけ璐ワ紝release妯″紡鍙互锛屾€庝箞瑙e喅锛?/a>
鍩轰簬MFC鐨勫簲鐢ㄧ殑CAppModule鍦╠ebug妯″紡涓嬪惎鍔ㄥけ璐ワ紝release妯″紡鍙互锛屾€庝箞瑙e喅锛?/h3>
灏忓紵鎴戠淮鎶や竴涓€佺増鏈殑杞欢锛屽彧鑳?code>release妯″紡涓嬬紪璇戞垚鍔燂紝鍙槸鎴戣璋冭瘯鍟婏紝浣嗘槸debug
妯″紡涓嬩笉鑳芥甯稿伐浣滒煒?/p>
CAppModule _Module; //鎺ㄦ柇鏄湪杩欓噷鍑虹殑闂锛侊紒BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
pure_call_patch::patch_pure_call_once();
_Module.Init(NULL, hModule);
do_on_dll_process_attach(hModule);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
_Module.Term();
do_on_dll_process_detach(hModule);
break;
}
return TRUE;
}
鏈夋病鏈夊ぇ绁炴寚瀵间笅
以上是 鍩轰簬MFC鐨勫簲鐢ㄧ殑CAppModule鍦╠ebug妯″紡涓嬪惎鍔ㄥけ璐ワ紝release妯″紡鍙互锛屾€庝箞瑙e喅锛?/a> 的全部内容, 来源链接: utcz.com/p/191720.html