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. "
"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