Getting iwebbrowser2 from ishellbrowser--the interface passed to setsite of internet explorer toolbar button com object 
Author Message
 Getting iwebbrowser2 from ishellbrowser--the interface passed to setsite of internet explorer toolbar button com object

I have an ATL Com Object that is an Internet Explorer toolbar button item.
MSDN documentation on registering the control works fine, however, it has a
major ommission.  SetSite (of IOLEClientSite, etc) is one of the first
functions called when the button is clicked.  However, unlike the SetSite of
other Internet Explorer inproc com objects (Active X Controls, Browser
Helper Objects, etc) the SetSite of a toolbar button object is passed the
IUnknown of IShellBrowser and not Iwebbrowser.  After looking through the
documentation and my own testing this is the IE hierarchy:

IshellBrowser  --  implements Ishellfolder
 ---> IShellView -- interface that instances of Internet Explorer
(shdovw.dll) and Windows Explorer exist in.

The problem is that there is no clear way to get to the Iwebbrowser
interface inside the Ishellview of a particular instance of Internet
Explorer.  The Browser extensions documentation at MSDN is noticable quiet
about how to get the browser instance.  Ishellbrowser has nothing to do with
Iwebbrowser it seems.  there is no source provided to demonstrate how to get
from Ishellbrowser to iwebbrowser.

Is there a way to get from Ishellbrowser to the iwebbrowser interface of the
window.

The MSDN documentation on the subject is noticable inadequate and their does
not seem to be anything similar to Dino Espositio's traversing
Shdocv.Shellwindow vector for ATL.

Any help would be greatly appreciated.



Sat, 28 Jun 2003 13:35:00 GMT  
 Getting iwebbrowser2 from ishellbrowser--the interface passed to setsite of internet explorer toolbar button com object
Quote:
> I have an ATL Com Object that is an Internet Explorer toolbar button item.
> MSDN documentation on registering the control works fine, however, it has
a
> major ommission.  SetSite (of IOLEClientSite, etc) is one of the first
> functions called when the button is clicked.  However, unlike the SetSite
of
> other Internet Explorer inproc com objects (Active X Controls, Browser
> Helper Objects, etc) the SetSite of a toolbar button object is passed the
> IUnknown of IShellBrowser and not Iwebbrowser.  After looking through the
> documentation and my own testing this is the IE hierarchy:

> IshellBrowser  --  implements Ishellfolder
>  ---> IShellView -- interface that instances of Internet Explorer
> (shdovw.dll) and Windows Explorer exist in.

> The problem is that there is no clear way to get to the Iwebbrowser
> interface inside the Ishellview of a particular instance of Internet
> Explorer.  The Browser extensions documentation at MSDN is noticable quiet
> about how to get the browser instance.  Ishellbrowser has nothing to do
with
> Iwebbrowser it seems.  there is no source provided to demonstrate how to
get
> from Ishellbrowser to iwebbrowser.

> Is there a way to get from Ishellbrowser to the iwebbrowser interface of
the
> window.

> The MSDN documentation on the subject is noticable inadequate and their
does
> not seem to be anything similar to Dino Espositio's traversing
> Shdocv.Shellwindow vector for ATL.

> Any help would be greatly appreciated.



Mon, 30 Jun 2003 07:13:32 GMT  
 Getting iwebbrowser2 from ishellbrowser--the interface passed to setsite of internet explorer toolbar button com object
Here you go:

    // Get and keep the main window's IWebBrowser2. With this we can
navigate
    // in the main window and write to the status bar
    IOleCommandTargetPtr pOleCommandTarget;

hr=pSite->QueryInterface(IID_IOleCommandTarget,(LPVOID*)&pOleCommandTarget);
    if(SUCCEEDED(hr))
    {
      IServiceProviderPtr pServiceProvider;
      hr=pOleCommandTarget->QueryInterface(&pServiceProvider);
      if(SUCCEEDED(hr))
 hr=pServiceProvider->QueryService(SID_SWebBrowserApp,&m_pMainWebBrowser);
    }

Matt


Quote:
> > I have an ATL Com Object that is an Internet Explorer toolbar button
item.
> > MSDN documentation on registering the control works fine, however, it
has
> a
> > major ommission.  SetSite (of IOLEClientSite, etc) is one of the first
> > functions called when the button is clicked.  However, unlike the
SetSite
> of
> > other Internet Explorer inproc com objects (Active X Controls, Browser
> > Helper Objects, etc) the SetSite of a toolbar button object is passed
the
> > IUnknown of IShellBrowser and not Iwebbrowser.  After looking through
the
> > documentation and my own testing this is the IE hierarchy:

> > IshellBrowser  --  implements Ishellfolder
> >  ---> IShellView -- interface that instances of Internet Explorer
> > (shdovw.dll) and Windows Explorer exist in.

> > The problem is that there is no clear way to get to the Iwebbrowser
> > interface inside the Ishellview of a particular instance of Internet
> > Explorer.  The Browser extensions documentation at MSDN is noticable
quiet
> > about how to get the browser instance.  Ishellbrowser has nothing to do
> with
> > Iwebbrowser it seems.  there is no source provided to demonstrate how to
> get
> > from Ishellbrowser to iwebbrowser.

> > Is there a way to get from Ishellbrowser to the iwebbrowser interface of
> the
> > window.

> > The MSDN documentation on the subject is noticable inadequate and their
> does
> > not seem to be anything similar to Dino Espositio's traversing
> > Shdocv.Shellwindow vector for ATL.

> > Any help would be greatly appreciated.



Tue, 01 Jul 2003 05:03:38 GMT  
 Getting iwebbrowser2 from ishellbrowser--the interface passed to setsite of internet explorer toolbar button com object
Hello-

I can help you with this- either send your demo to

or call me directly at 1-909-244-9815

I will help you with this - since this is what ou department does-

Thanks-

On Tue, 09 Jan 2001 05:35:00 GMT, "Lenworth Henry"

Quote:

>I have an ATL Com Object that is an Internet Explorer toolbar button item.
>MSDN documentation on registering the control works fine, however, it has a
>major ommission.  SetSite (of IOLEClientSite, etc) is one of the first
>functions called when the button is clicked.  However, unlike the SetSite of
>other Internet Explorer inproc com objects (Active X Controls, Browser
>Helper Objects, etc) the SetSite of a toolbar button object is passed the
>IUnknown of IShellBrowser and not Iwebbrowser.  After looking through the
>documentation and my own testing this is the IE hierarchy:

>IshellBrowser  --  implements Ishellfolder
> ---> IShellView -- interface that instances of Internet Explorer
>(shdovw.dll) and Windows Explorer exist in.

>The problem is that there is no clear way to get to the Iwebbrowser
>interface inside the Ishellview of a particular instance of Internet
>Explorer.  The Browser extensions documentation at MSDN is noticable quiet
>about how to get the browser instance.  Ishellbrowser has nothing to do with
>Iwebbrowser it seems.  there is no source provided to demonstrate how to get
>from Ishellbrowser to iwebbrowser.

>Is there a way to get from Ishellbrowser to the iwebbrowser interface of the
>window.

>The MSDN documentation on the subject is noticable inadequate and their does
>not seem to be anything similar to Dino Espositio's traversing
>Shdocv.Shellwindow vector for ATL.

>Any help would be greatly appreciated.



Sun, 10 Aug 2003 09:08:58 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting iwebbrowser2 from ishellbrowser--the interface passed to setsite of internet explorer toolbar button com object

2. Getting an IShellBrowser interface???

3. Getting an IShellBrowser Interface???

4. IShellBrowser interface

5. How to use IShellBrowser Interface?

6. IShellBrowser interface

7. Getting a IShellBrowser pointer to the Explorer

8. Navigate and IWebBrowser2 interface

9. WebBrowser Control and IWebBrowser2-interface-pointer

10. IWebBrowser2 interface to IE.

11. Getting IWebBrowser2 from modeless dialog

12. Getting IWebBrowser2 from an HWND?

 

 
Powered by phpBB® Forum Software