HlinkSimpleNavigateToMoniker
This function executes a hyperlink jump to a new document or object (specified
in pmkTarget).
HRESULT HlinkSimpleNavigateToMoniker(
IMoniker * pmkTarget,
|
//Moniker of the hyperlink target
|
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
-
pmkTarget
-
[in] Pointer to the moniker which identifies the hyperlink target. If NULL,
then the navigation is within a document.
-
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.
-
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 moniker of its target has navigated to it
successfully.
This function can also return any value returned by
IHlink::Navigate.
Remarks
The HlinkSimpleNavigateToMoniker 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.
See Also
HLNF,
HlinkNavigateToStringReference,
HlinkSimpleNavigateToString,
IHlink::Navigate