My credentialprovider has a CDHtmlDialog which throws an exception only when the credprov dll is loaded by credentialuibroker.exe (the UAC like prompt with the title Windows Security, when you do remote or access a network folder).The credential provider displays the CDHtmlDialog successfully during Windows logon (logonui.exe) or accessing a network resource (explorer.exe). Note that the exception is inside MFC's implementation of CDHtmlDialog.
File - dlgdhtml.cpp.
BOOL CDHtmlDialog::OnInitDialog()
{......
m_wndBrowser.CreateControl(CLSID_WebBrowser, NULL, WS_VISIBLE | WS_CHILD, rectClient, this, AFX_IDC_BROWSER);
lpUnk = m_wndBrowser.GetControlUnknown();
// The next line throws exception that - Unhandled exception at 0x6be243d8 (mfc100.dll) in CredentialUIBroker.exe: 0xC000041D: An unhandled exception was encountered during a user callback.
if (FAILED(lpUnk->QueryInterface(IID_IWebBrowser2, (void**) &m_pBrowserApp)))
{......
}
}
I have tried with same results, the sample credential provider available in MS SDK. I have tried Visual Studio 2010 and Visual Studio 2015. I have tried adding CoInitialize, AfxOleInit to InitInstance. Let me know if anybody has suggestions on what could be wrong.
Thank you
User contributions licensed under CC BY-SA 3.0