This helper function should be used by all application, documents, and objects that have simple navigation needs. This single function call that will ôdo the right thingö depending on whether the navigation is originating from within a hyperlink frame or within a hyperlink-unaware application.
HlinkSimpleNavigateToMoniker(
IMoniker
* pmkTarget, //Moniker of the hyperlink target
LPCWSTR szLocation, //Optional string representing location within target
LPCWSTR szTargetFrameName, //Optional string naming the target frame
LPCWSTR szAdditionalParams, //Optional additional parameters
IUnknown * punk, //IUnknown interface of initiating document or object
DWORD grfHLNF, //Navigation flags
IBindCtx * pbc, //Bind context object
IBindStatusCallback * pbsc, //Bind status callback
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. May not be NULL.
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 argument only affects navigation within a document container that understands frame-sets.
szAdditionalParams
[in] Additional string parameters for the hyperlink navigation (currently ignored). IHlink::SetAdditionalParams and IHlink::GetAdditionalParams describe the format.
pUnk
[in] The IUnknown pointer to the document or object that is initiating the hyperlink. If NULL, it is assumed the hyperlink originates from an OLE-unaware application.
grfHLNF
[in] Value taken from the HLNF enumeration.
pbc
[in] Bind context to use for any moniker binding performed during the navigation. May not be NULL.
pbsc
[in] Bind-status-callback to use for any asynchronous moniker binding performed during the navigation. May be NULL, in which case the caller is not interested in progress notification, cancellation, pausing, or low-level binding information.
dwReserved
[in] Reserved for future use, must be set to NULL.
Return Values
S_OK
A hyperlink knowing the moniker of its target has navigated to it successfully.
This function can also return any value returned by IHlink::Navigate.
See Also
HlinkNavigate, HlinkNavigateToStringReference, HlinkSimpleNavigateToString, HLNF