首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

请问 afxwin1.inl中ASSERT(afxCurrentResourceHandle != NULL);的有关问题

2012-05-27 
请教 afxwin1.inl中ASSERT(afxCurrentResourceHandle ! NULL)的问题想用开源的测试框架提供的DLL搭建测

请教 afxwin1.inl中ASSERT(afxCurrentResourceHandle != NULL);的问题
想用开源的测试框架提供的DLL搭建测试环境,编译时无问题,运行时候报错

C/C++ code
BOOL CUdiskUpgradeTestApp::InitInstance(){    INITCOMMONCONTROLSEX InitCtrls;    InitCtrls.dwSize = sizeof(InitCtrls);    InitCtrls.dwICC = ICC_WIN95_CLASSES;    InitCommonControlsEx(&InitCtrls);    CWinApp::InitInstance();    AfxEnableControlContainer();    SetRegistryKey(_T("应用程序向导生成的本地应用程序"));//    CUdiskUpgradeTestDlg dlg;//    m_pMainWnd = &dlg;//    INT_PTR nResponse = dlg.DoModal();//    if (nResponse == IDOK)//    {        // TODO: 在此处放置处理何时用“确定”来关闭        //  对话框的代码//    }//    else if (nResponse == IDCANCEL)//    {        // TODO: 在此放置处理何时用“取消”来关闭        //  对话框的代码//    }    // 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,    //  而不是启动应用程序的消息泵。    GdiplusStartup(&m_GdiplusToken, &m_GdiplusStartupInput, NULL);    CppUnit::MfcUi::TestRunner runner;    CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();    runner.addTest(registry.makeTest());    runner.run(); //show UI    return FALSE;}


TestRunner 是DLL里面的。
出现 afxwin1.inl中ASSERT(afxCurrentResourceHandle != NULL);的问题
因为问题比较急 ,希望大家帮帮忙。

[解决办法]
出断言的时候选重试
程序断下来之后看看调用堆栈
定位到具体的位置才好分析
[解决办法]
顶起来啊,也遇到了这个问题

热点排行