views:

431

answers:

2

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)

A: 

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.

Paul Mitchell
Good question. I think it was installed system wide.
Simon Stewart
A: 

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

Simon Stewart