Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: 22 Mar 2006 02:39:50 -0800,    group: microsoft.public.inetsdk.programming.urlmonikers        back       


Why isn't I get the browser context in refresh case?   
I have multiple web browser control instances...

1. Default
2. Hosted in custom explorer bar

Now following code always gets me the browser making the request,
however, it doesn't in Refresh (using F5 or Refresh button) case. Can
anyone provide an alternative or better way to figure out the browser
in context while processing the request in OnStart()

/////////////////////////////////
// Code
/////////////////////////////////
HRESULT CInternetProtocolWrapper::OnStart(LPCWSTR szUrl,
IInternetProtocolSink *pOIProtSink,IInternetBindInfo *pOIBindInfo,
DWORD grfPI, HANDLE_PTR dwReserved,IInternetProtocol* pTargetProtocol)
{
        HRESULT hr = E_FAIL;

        // Get the service provider interface to get to the webbrowser
that made the request
        IServiceProviderPtr pServiceProvider;
        hr =
pOIProtSink->QueryInterface(IID_IServiceProvider,(void**)&pServiceProvider);

        // Get the webbrowser that made this request
        IWebBrowser2Ptr pWebBrowser2;
        hr = pServiceProvider->QueryService(SID_SWebBrowserApp,
IID_IWebBrowser2, (void**)&pWebBrowser2);

}
date: 22 Mar 2006 02:39:50 -0800   author:   Vijay B

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us