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 Navigate2method navigates to a URL, file or pointer to an item identifier list (PIDL).

Syntax

HRESULT Navigate2(
  VARIANT* 
URL,
  VARIANT* 
Flags,
  VARIANT* 
TargetFrameName,
  VARIANT* 
PostData,
  VARIANT* 
Headers
);

Parameters

URL

[in] Pointer to a VARIANTof type VT_BSTRthat specifies a URL or file to navigate to.

Flags

[in, optional] This variable is not used.

TargetFrameName

[in, optional] Pointer to a VARIANTstructure of type VT_BSTRthat contains the name of the frame in which to display the resource. The possible values for this parameter are described in the following table.

Value Description

_blank

Load the link into a new unnamed window.

_parent

Load the link into the immediate parent of the document the link is in.

_self

Load the link into the same window the link was clicked in.

_top

Load the link into the full body of the current window.

window name

A named HTML frame. If no frame or window exists that matches the specified target name, a new window is opened for the specified link.

PostData

[in, optional] Pointer to variable that specifies data to send with the HTTP POST transaction. For example, the POST transaction is used to send data gathered by an HTML form.

Headers

[in, optional] Pointer to a variable that specifies the HTTP headers to send to the server.

Return Value

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

S_OK

The method completed successfully.

DISPID

Copy Code
DISPID_WEBBROWSER_NAVIGATE2

The DISPIDis defined in piedocvw.h. Use this value to identify the event handler when implementing 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

IWebBrowser2