> hello,
> I'm writing an ActiveX control for Internet Explorer.
> I also need to have access to the IWebBrowser2 interface of
> the running instance of Internet Explorer.Would you please send
> your source code to me to show me how to do that?
> thank you very much!
> > It is working !
> > Thank you very much for the answer !
> > Happy easter
> > regards
> > Mike
> > > I have seen it reported on the newsgroups that you can QI the
pointer
> > > you get in SetSite for IServiceProvider, and call
> > > QueryService(SID_SWebBrowserApp) to get IWebBrowser2 pointer. Have
not
> > > tried it myself though.
> > > --
> > > With best wishes,
> > > Igor Tandetnik
> > > "For every complex problem, there is a solution that is simple,
neat,
> > > and wrong." H.L. Mencken
> > > > Hello all..
> > > > I'm writing an extension for Internet Explorer.
> > > > I need to have access to the IWebBrowser2 interface of
> > > > the running instance of Internet Explorer.
> > > > I followed the instructions from the MS web site and I
implemented
> > > > a toolbar button that calls my COM object.
> > > > What I did from MS web site :
> > > > "Adding a toolbar button"
> > > > - Done
> > > > "Telling the browser that I want to call my COM"
> > > > - Done and working (I added MessageBox in FinalConstruct and
> > > > FinalRelease)
> > > > "If your COM object needs to access the Dynamic HTML (DHTML)
> > > Object
> > > > Model
> > > > of the page that Internet Explorer is currently displaying,
you
> > > must
> > > > implement IObjectWithSite."
> > > > - Done
> > > > "When IObjectWithSite is implemented, Internet Explorer will
call
> > > > IObjectWithSite::SetSite and
> > > > pass it a pointer to IShellBrowser."
> > > > - Done and SetSite is called properly when my object in
loaded
> > > > I see here that SetSite is called and a pointer to IShellBrowser
is
> > > > passed... why when I write a browser helper
> > > > object, SetSite pass a IWebBrowser2 and when my COM is called
from an
> > > > iexplorer toolbar button, it pass a
> > > > IShellBrowser pointer ?
> > > > Can I retrieve a IWebBrowser2 from a IShellBrowser ? How ?
> > > > I don't want to create a Browser Helper Object because I don't
want my
> > > > object to load
> > > > in memory automatically when Windows Explorer starts...
> > > > Any help ?
> > > > thank you for reading