Click to return to the Reusing Browser Technology home page    
IWebBrowser2::Navigate Me...     IWebBrowser2::put_Address...     IWebBrowser2 Interface    
Web Workshop  |  Reusing Browser Technology

IWebBrowser2::Navigate2 Method


Navigates the browser to a location that might not be able to be expressed as a URL, such as a pointer to an item identifier list (PIDL) for an entity in the Microsoft® Windows® shell namespace.

Syntax

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

Parameters

URL
[in] Address of a VARIANT that contains one of the following values:
VT_BSTR String that contains a URL to navigate to.
VT_ARRAY|VT_UI1PIDL that represents a folder to navigate to.
Flags
[in] Address of a variable that specifies whether to add the resource to the history list, whether to read to or write from the cache, and whether to display the resource in a new window. The variable can be a combination of the values defined by the BrowserNavConstants enumeration.
TargetFrameName
[in] Address of a string that contains the name of the frame in which to display the resource.
PostData
[in] Address of data to send with the HTTP POST transaction. For example, the POST transaction is used to send data gathered by an HTML form. If this parameter does not specify any post data, the Navigate2 method issues an HTTP GET transaction. This parameter is ignored if URL is not an HTTP URL.
Headers
[in] Address of a value that contains the HTTP headers to send to the server. These headers are added to the default Microsoft® Internet Explorer headers. 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. This parameter is ignored if URL is not an HTTP URL.

Return Value

Returns one of the following values:

S_OK The operation was successful.
E_INVALIDARG One or more parameters are invalid.
E_OUTOFMEMORY Out of memory.

Remarks

This method extends the Navigate method to allow for shell integration; however, the original Navigate method can still be used for URL navigations (Navigate2 does not make Navigate obsolete).

The post data specified by PostData is passed as a SAFEARRAY structure. The variant should be of type VT_ARRAY and point to a SAFEARRAY. The SAFEARRAY should be of element type VT_UI1, dimension one, and have an element count equal to the number of bytes of post data.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

See Also

DWebBrowserEvents2::BeforeNavigate2, DWebBrowserEvents2::NavigateComplete2, HREF="http://msdn.microsoft.com/isapi/gosupport.asp?TARGET=/support/kb/articles/q167/8/34.asp">Microsoft Knowledge Base HOWTO: Web Browser Navigation Using a PIDL Non-MSDN link


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.