Click here to get back home

Getting IWebBrowser2 Interface

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Getting IWebBrowser2 Interface Steve Block 11-07-2007
Posted by Steve Block on November 7, 2007, 3:01 pm
Please log in for more thread options
Hi,

I'm trying to get the IWebBrowser2 interface for the instance of IE
hosting an ActiveX object on Windows Mobile 5 Pocket PC.

My object inherits from IObjectWithSiteImpl. The code I'm using is
below, and is called from my implementation of
IObjectWithSite::SetSite(IUnknown *site).

CComQIPtr<IServiceProvider> service_provider;
CComQIPtr<IWebBrowser2> browser;
HRESULT hr1 = site->QueryInterface(IID_IServiceProvider, (void **)
(&service_provider));
HRESULT hr2 = service_provider->QueryService(IID_IWebBrowserApp,
IID_IWebBrowser2, reinterpret_cast<void**>(&browser));

The call to QueryInterface works fine, but the call to QueryService
fails with E_NO_INTERFACE. I've tried creating the object using both
<object> and ActiveXObject() in the HTML but neither work.

The code works fine on desktop IE, and also works on Pocket PC when I
create the object as a browser helper object, but not when the object
is an ActiveX object.

Any suggestions? My overall intent is to get the URL of the page on
which the ActiveX object was created, so please let me know if there's
an alternative method of doing this.

Thanks, Steve


Similar ThreadsPosted
How to get IWebBrowser2 from the HTML Control on SP2005 December 5, 2005, 5:25 am
Getting HTML Source from IWebBrowser2 on Windows Mobile November 5, 2007, 12:02 am
ril interface June 29, 2005, 2:19 am
How to get IMESSAGE interface August 30, 2005, 12:45 am
Turn off Cellphone Interface? December 8, 2005, 2:43 pm
IHTMLDocument3 Interface access January 11, 2007, 12:26 am
DirectShow interface availability April 4, 2007, 5:37 pm
VS 2005 PPC/SP Emulator - No such interface supported May 24, 2006, 10:55 am
VOIP Application interface layer January 2, 2008, 2:30 pm
How can I access the phone ME interface with standard APDU? November 10, 2005, 4:37 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap