Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The BeforeNavigate2event 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 IDispatchinterface for the WebBrowserobject that represents the window or frame

URL

[in] Pointer to a VARIANTstructure of type VT_BSTRthat contains the URL to browse to

pvtFlags

[in] Reserved. Must be set to NULL.

pvtTargetFrameName

[in] Pointer to a VARIANTstructure of type VT_BSTRthat 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 VARIANTstructure 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 VARIANTstructure of type VT_BSTRthat 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_BOOLvalue that specifies VARIANT_TRUE to cancel the navigation operation and VARIANT_FALSE to allow it to continue

Return Values

None.

Event DISPID

Copy Code
DISPID_BEFORENAVIGATE2

The DISPIDfor 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