HlinkSimpleNavigateToString
This function executes a hyperlink jump to a new document or object (specified in szTarget).
HRESULT HlinkSimpleNavigateToString(
LPCWSTR szTarget, //String to be resolved into target's
// moniker
LPCWSTR szLocation, //Optional string representing
// location within target
LPCWSTR szTargetFrameName, //Optional string naming the target
// frame
IUnknown * punk, //IUnknown pointer to the initiating
// document or object
IBindCtx * pbc, //Bind context object
IBindStatusCallback * pbsc, //Bind status callback
DWORD grfHLNF, //Navigation flags
DWORD dwReserved //Reserved for future use
);
Parameters
-
szTarget
-
[in] String which helps identify the hyperlink target. This string is resolved into a moniker for underlying binding operations via MkParseDisplayNameEx. If NULL, then the navigation is within a document. This parameter is required.
-
szLocation
-
[in] Optional string representing the location within the hyperlink target for the new hyperlink.
-
szTargetFrameName
-
[in] Optional string naming the target frame for the hyperlink navigation. This string is case-sensitive for browser compatibility. This parameter only affects navigation within a document container that understands frame-sets.
-
pUnk
-
[in] Pointer to the IUnknown interface on the document or object that is initiating the hyperlink. If NULL, it is assumed the hyperlink originates from an ActiveX-unaware application. Note that if the caller of this function is an ActiveX Control or Document Object, you must pass a valid value for this parameter in order for navigation to work correctly.
-
pbc
-
[in] Pointer to the IBindCtx interface on the bind context to use for any moniker binding performed during the navigation. Must not be NULL.
-
pbsc
-
[in] Pointer to the IBindStatusCallback interface on the bind-status-callback to use for any asynchronous moniker binding performed during the navigation. If NULL, the caller is not interested in progress notification, cancellation, pausing, or low-level binding information.
-
grfHLNF
-
[in] Value taken from the HLNF enumeration.
-
dwReserved
-
[in] Reserved for future use; must be set to NULL.
Return Values
-
S_OK
-
A hyperlink knowing the name of its target has navigated to it successfully.
Remarks
The HlinkSimpleNavigateToString helper function should be used by all applications, documents, and objects that have simple navigation needs. This single function call will "do the right thing" depending on whether the navigation is originating from within a hyperlink frame or within a hyperlink-unaware application.
QuickInfo
Windows NT: Use version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in hlink.h.
See Also
HLNF, HlinkNavigateToStringReference, HlinkSimpleNavigateToMoniker, IHlink::Navigate