The BeforeNavigate2 event method fires before navigation occurs in the given object on either a window or frameset element.
Note Windows Mobile-based Smartphones do not support frames.
void BeforeNavigate2( IDispatch* pDisp, VARIANT* URL, VARIANT* pvtFlags, VARIANT* pvtTargetFrameName, VARIANT* pvtPostData, VARIANT* pvtHeaders, VARIANT_BOOL* pvbCancel );
[in] Pointer to the IDispatch interface for the WebBrowser object that represents the window or frame.
[in] Pointer to a VARIANT structure of type VT_BSTR that contains the URL to be navigated to.
[in] Reserved. Must be set to NULL.
[in] Pointer to a VARIANT structure of type VT_BSTR that contains the name of the frame in which to display the resource, or NULL if no named frame is targeted for the resource.
[in] Pointer to a VARIANT structure of type VT_BYREF|VT_VARIANT that contains the data to send to the server if the HTTP POST transaction is being used.
[in] Pointer to a VARIANT structure of type VT_BSTR that contains additional HTTP headers to send to the server (HTTPURLs only). The headers can specify things such as the action required of the server, the type of data being passed to the server, or a status code.
[in,out] Pointer to a VARIANT_BOOL value that specifies VARIANT_TRUE to cancel the navigation operation and VARIANT_FALSE to allow it to proceed.
The DISPID for this event is defined in piedocvw.h. Use this value to identify the event handler when implementing IDispatch::Invoke.
pvbCancel is not supported in Windows Mobile 5.0.
Pocket PC: Windows Mobile Version 5.0 and later
Smartphone: Windows Mobile Version 5.0 and later
OS Versions: Windows CE 5.01 and later
Send Feedback on this topic to the authors