DWebBrowserEvents2::BeforeNavigate2

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

The BeforeNavigate2 event method raises before navigation occurs in the given object on either a window or frameset element.

Syntax

void BeforeNavigate2(
  IDispatch* pDisp,
  VARIANT* URL,
  VARIANT* pvtFlags,
  VARIANT* pvtTargetFrameName, 
  VARIANT* pvtPostData, 
  VARIANT* pvtHeaders,
  VARIANT_BOOL* pvbCancel
);

Parameters

  • pDisp
    [in] Pointer to the IDispatch interface for the WebBrowser object that represents the window or frame
  • URL
    [in] Pointer to a VARIANT structure of type VT_BSTR that contains the URL to browse to
  • pvtFlags
    [in] Reserved. Must be set to NULL.
  • pvtTargetFrameName
    [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
  • pvtPostData
    [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.
  • pvtHeaders
    [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 kind of data being passed to the server, or a status code.
  • pvbCancel
    [in,out] Pointer to a VARIANT_BOOL value that specifies VARIANT_TRUE to cancel the navigation operation and VARIANT_FALSE to allow it to continue

Return Values

None.

Event DISPID

DISPID_BEFORENAVIGATE2

The DISPID for this event is defined in piedocvw.h. Use this value to identify the event handler when you implement IDispatch::Invoke.

Requirements

Header piedocvw.h
Library piedocvw.lib
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

See Also

Reference

DWebBrowserEvents2
DWebBrowserEvents2::NavigateComplete2
IWebBrowser2::Navigate
IWebBrowser2::Navigate2