Share via


DWebBrowserEvents2::BeforeNavigate2

Send Feedback

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.

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 be navigated 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 type 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 proceed.

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 implementing IDispatch::Invoke.

Remarks

pvbCancel is not supported in Windows Mobile 5.0.

Requirements

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
Header: piedocvw.h
Library: piedocvw.lib

See Also

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

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.