After the automation browser control submits the form, the browser control may redirect to an error page when browsing timeout. Sometimes you need to return to your form after returning with the code control page.
The version of the browser control before IE6.0 does not get an interface to the HTTP state. A method that is very dependent on the website is to capture the Titlechange event, when the page title contains a string such as "Can't find the page" or "Page Not Found", it is considered that the browsing failed. Another method is to process beforenaviGate2 events, use the WinHTTP API separate and server connections, using HttpQueryInfo to query, the corresponding parameters are http_query_status_code. Prior to this, you may want to use Internet_flag_ignore_redirect_to_http | Internet_rdirect_to_http | Internet_HTTPS flag to prevent the server from redirecting.
This approach causes each page twice, initiated by the browser control, initiated by the URL test code once. Download two downloads may have different results, so this approach may not be accurate.
The browser control does not support the IbindStatusCallback interface, nor does it get a known method for obtaining the IWININETHTTPINFO interface from the browser control.
InternetGetLastResponseInfo will not return an error when you can't find a web page (404).
The IE6.0 version of the browser control can trigger DWEBBROWSEREVENTS2 :: NaviGateError event to notify the browsing error and provide an error code. However, this event is only triggered after browsing using the code. This event does not trigger this event when you click on the chain contact to send a browsing error.
reference
http://www.microsoft.com/mind/0796/protocol/protocol.asp
Http://msdn.microsoft.com/workshop/browser/webbrowser/reference/ifaces/dwebbrowserevents2/navigateerror.asp