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: Wed, 19 Mar 2008 17:44:53 -0700 (PDT),    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


retrieve http header after navigate   
Hi,

I'm trying to get the http header after I call navigate. The following
is from microsoft's msdn. It seems that I can use NavigateComplete2 to
serve this pupose. But when I looked at the stub of NavigateComplete2,
it's totally different from the BeforeNavigate2. It's like this
void NavigateComplete2(  IDispatch *pDisp, VARIANT *URL );

Can anyone tell me how to to retrieve the http header from this
function? Or is it simple a microsoft doc error?

From Microsoft msdn
"The WebBrowser control fires a number of different events to notify
an application of activity generated by the user and browser itself.
When the browser is about to navigate to a new location, it triggers a
BeforeNavigate2 event that specifies the URL or path of the new
location and any other data that will be transmitted to the Web server
through the HTTP transaction. The data can include the HTTP header,
HTTP post data, and the URL of the referrer. The BeforeNavigate2 event
also includes a Cancel flag that can be set to halt the pending
navigation request. This event can be useful for checking the
requested URL against a database of unauthorized Web sites or local
and network folders, and for canceling or redirecting the navigation
request. The WebBrowser control fires the NavigateComplete2 event
after it has successfully navigated to a new location. This event
includes all the same information as BeforeNavigate2 except the Cancel
flag. "
date: Wed, 19 Mar 2008 17:44:53 -0700 (PDT)   author:   Sue

Re: retrieve http header after navigate   
"Sue"  wrote in message
news:d4a3f80e-c06a-4839-8450-a385fa8c8e57@8g2000hsu.googlegroups.com
> I'm trying to get the http header after I call navigate. The following
> is from microsoft's msdn. It seems that I can use NavigateComplete2 to
> serve this pupose. But when I looked at the stub of NavigateComplete2,
> it's totally different from the BeforeNavigate2. It's like this
> void NavigateComplete2(  IDispatch *pDisp, VARIANT *URL );
>
> Can anyone tell me how to to retrieve the http header from this
> function? Or is it simple a microsoft doc error?

Doc error. You don't get response headers in NavigateComplete2 or any 
other event handler. See also

http://groups.google.com/group/microsoft.public.inetsdk.programming.mshtml_hosting/msg/76bf4910a289d4b3

-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Wed, 19 Mar 2008 21:01:34 -0400   author:   Igor Tandetnik

Google
 
Web ureader.com


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