BOOL CDESIGNApp::InitInstance()
{
CWinApp::InitInstance();
if (dsnInterfaceImp::s_Instance==NULL)
{
dsnInterfaceImp::s_Instance = new dsnInterfaceImp;
}
#ifdef _GHDEBUG
HMODULE hM = m_hInstance;
HMODULE h_dll;
GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (char*)_ReturnAddress(), &h_dll);
if (h_dll == hM)
{
AfxMessageBox(_T("Equal!"));
}
TCHAR filepath[MAX_PATH * 10] = { 0 };
GetModuleFileName(hM, filepath, MAX_PATH * 10);
AfxMessageBox(filepath);
#endif
return TRUE;
}
获取dll所在路径相关代码
最新推荐文章于 2024-11-02 20:20:37 发布