Fires before navigation occurs in the given object (on either a window or frameset element).
void BeforeNavigate( IDispatch *pDisp, VARIANT *url, VARIANT *Flags, VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers, VARIANT_BOOL *Cancel );
- [in] A pointer to the IDispatch interface for the WebBrowser object that represents the window or frame. This interface can be queried for the IWebBrowser2 interface.
- [in] A 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] A 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] A 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 used.
- [in] A pointer to a VARIANT structure of type VT_BSTR that contains additional HTTP headers to send to the server (HTTP URLs only). The headers can specify information, such as the action required of the server, the type of data being passed to the server, or a status code.
- [in, out] A pointer to a VARIANT structure of type VARIANT_BOOL that contains the cancel flag. An application can set this parameter to VARIANT_TRUE to cancel the navigation operation, or to VARIANT_FALSE to allow the navigation operation to proceed.
No return value.
The DISPID for this event is defined in exdispid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.
This event is obsolete. Use the DWebBrowserEvents2::BeforeNavigate2 event instead.