HlinkNavigateToStringReference function

[HlinkNavigateToStringReference may be altered or unavailable in subsequent versions of the operating system or product.]

Note  The Microsoft ActiveX Hyperlink API is deprecated in Windows Internet Explorer 8 and later, and ActiveX technology as a whole is unsupported in the Microsoft Edge browser in favor of standards-based web APIs. For more information, see Saying goodbye to ActiveX, VBScript, attachEvent... and Get ready for plug-in free browsing.

Creates a hyperlink site from strings that represent the hyperlink target, the location in the target, and a friendly name; and then navigates to that site.


HRESULT HlinkNavigateToStringReference(
  _In_ LPCWSTR             pwzTarget,
  _In_ LPCWSTR             pwzLocation,
  _In_ IHlinkSite          *pihlsite,
  _In_ DWORD               dwSiteData,
  _In_ IHlinkFrame         *pihlframe,
  _In_ DWORD               grfHLNF,
  _In_ LPBC                pibc,
  _In_ IBindStatusCallback *pibsc,
  _In_ IHlinkBrowseContext *pihlbc


pwzTarget [in]

The address of the string that helps identify the hyperlink target. This string is resolved into a moniker for underlying binding operations through MkParseDisplayNameEx. This must not be NULL.

pwzLocation [in]

The address of the location in the hyperlink target of the new hyperlink object.

pihlsite [in]

The address of the IHlinkSite interface on the site object for the new hyperlink object. This is optional, in which case pwzTarget must be an absolute reference.

dwSiteData [in]

The additional site data for the new hyperlink object.

pihlframe [in]

The address of the IHlinkFrame interface for the hyperlink frame object of the hyperlink container object. This can be NULL, if the hyperlink container does not have a hyperlink frame.

grfHLNF [in]

A value taken from the HLNF enumeration.

pibc [in]

The address of the IBindCtx interface on the bind context object to use for any moniker binding performed during the navigation. This must not be NULL.

pibsc [in]

The address of the IBindStatusCallback interface on the bind-status-callback object to use for any asynchronous moniker binding performed during the navigation. If this is NULL, the caller does not receive progress notification, cancellation, pausing, or low-level binding information.

pihlbc [in]

A IHlinkBrowseContext interface pointer to the browse context object to use for this navigation. The browse context includes history information, where this navigation is logged if grfHLNF is not set to HLNF_CREATENOHISTORY.

Return value

Returns S_OK if successful.


This helper function is identical to calling the following.

// create hyperlink site, IBindStatusCallback,
// gather bind context, and browse context 
HlinkCreateFromString(pwzTarget, pwzLocation,
    pwzFriendlyName, &hlSite, dwSiteData, NULL,
    IID_IHlink, (void**)&phl);
HlinkNavigate(pihl, pihlframe, grfHLNF, pbc, pibsc, pihlbc);


Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server







See also