Click to return to the Reusing Browser Technology home page    
IWebBrowser2::GoSearch Me...     IWebBrowser2::Navigate2 M...     IWebBrowser2 Interface    
Web Workshop  |  Reusing Browser Technology

IWebBrowser2::Navigate Method


Navigates to a resource identified by a URL or to the file identified by a full path.

Syntax

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

Parameters

URL
Caller-allocated string that specifies the URL to navigate to or the full path of the file to display.
Flags
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
Address of a string that contains the name of the frame in which to display the resource.
PostData
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, Navigate issues an HTTP GET transaction. This parameter is ignored if URL is not an HTTP URL.
Headers
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

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


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.