Simon Stewart
Simon Stewart

Reputation: 271

Error 800706B5 when calling IWebBrowser2->get_Document

On Vista using IE8, I have an instance of IWebBrowser2, which I am using to obtain the current HTML document:

IWebBrowser2* browser;
CComPtr<IDispatch> disp;
HRESULT hr = browser->get_Document(&disp);

When this is executed by an Administrator, the call succeeds. However, when called by a regular user, the call returns an error code of "800706B5" ("The interface is unknown") despite the page being on a "Trusted Site" and "Protected Mode" being off.

This same code worked without problems on IE7 on Vista, and with IE8 on XP.

Does anyone know why this error might be occurring, and what I can do to resolve the issue? Running as administrator is less than ideal, and Jon Skeet is stumped by this one too :)

Update: the question seems to revolve around UAC: turning off UAC completely allows things to work for a regular user (though it's distinctly unsafe)

Upvotes: 2

Views: 9662

Answers (2)

Simon Stewart
Simon Stewart

Reputation: 271

The error is occurring because on Vista, IE 8 runs in "low integrity" mode, whereas my test code, running as a normal user, runs at "medium integrity". The security model is designed so that code can send instructions to lower integrity components, but data cannot be read from "lower" to "higher" components by default.

More information is available in this document about How the Integrity Mechanism Is Implemented in Windows Vista

Upvotes: 1

Paul Mitchell
Paul Mitchell

Reputation: 3281

Was IE8 installed by the Administrator "For this user only"? I don't know why or if that would give this error, just a hunch.

Upvotes: 0

Related Questions