none
AtlAxWinInit() GetLastError=1411 RRS feed

  • 问题

  • 我再VS2013使用AtlAxWinInit()后发现GetLastError=1411,是什么原因呢?

    	OutputDebugString(TEXT("====进入 BOOL CSmartPrinter::PrintUrl(LPVOID p_Ojbect, LPWSTR pUrl)"));
    	pMain->SetUrl(pUrl);
    	RECT rcMain = { 0, 0, 800, 600 };							//定义一个矩形的宽度
    	ShowDebugInfo(L"=========33=====GetLastError()=%d", GetLastError());
    	if (!AtlAxWinInit())
    	{
    		ShowDebugInfo(L"===AtlAxWinInit初始化失败");
    	}
    	ShowDebugInfo(L"=========44=====GetLastError()=%d", GetLastError());
    
    	if (pMain == NULL)
    	{
    		ShowDebugInfo(L"===========pMain==NULL", GetLastError());
    	}
    	if (pMain->Create(NULL, rcMain, _T("printUrl"), WS_POPUP) == NULL)
    	{
    		ShowDebugInfo(L"===========pMain->Create失败!");
    
    	}

    结果为:

    00000008 5.03960609 [7284] ============================else if (name == "printUrl")
    00000009 9.39719772 [7284] ====进入 BOOL CSmartPrinter::PrintUrl(LPVOID p_Ojbect, LPWSTR pUrl)
    00000010 9.39722729 [7284] ======================进入void CMain::SetUrl(LPTSTR pUrl)
    00000011 9.39727879 [7284] =========33=====GetLastError()=0
    00000012 9.39735222 [7284] =========44=====GetLastError()=1411
    00000013 9.39850044 [7284] ================CMain::OnCreate()开始
    00000014 9.39860916 [7284] ================错误:m_hwndWebBrowser==NULL,GetLastError()=1407
    00000015 9.39864540 [7284] ================错误在hr = AtlAxGetControl(m_hwndWebBrowser, &m_pWebBrowserUnk);GetLastError()=1400

    2016年4月7日 2:15

全部回复