Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

QueryInterface method for the IID_IPersistStreamInit quit working

9 views
Skip to first unread message

wqr

unread,
Nov 2, 2009, 4:49:02 PM11/2/09
to
I have an application that I've been using to parse data from an HTML
document. The application has been working for a few years until a couple
weeks ago when the QueryInterface method for the IID_IPersistStreamInit
started failing. The call to QueryInterface is returning -2147467262 which
fails the SUCCEEDED(hr) test. Any ideas why this quit working? It seems like
it may be a result of a Windows update; it is still working on other machines.

Thanks,
Wade

if (!myIE->IsValid()) return;
HRESULT hr;
LPDISPATCH lpDispatch = NULL;
LPOLECOMMANDTARGET lpOleCommandTarget = NULL;
LPPERSISTSTREAM lpPersistStream = NULL;
lpDispatch = myIE->GetHtmlDocument();
ASSERT(lpDispatch);
if (lpDispatch == NULL)
AfxMessageBox("Couldn't get IHTMLDocument2 interface!");
else
{
hr = lpDispatch->QueryInterface(IID_IPersistStreamInit,
(void**)&lpPersistStream);
if (SUCCEEDED(hr) && lpPersistStream != NULL)

0 new messages