# HlinkNavigateToStringReference

Creates a hyperlink site from strings representing the hyperlink target, the location within the target, and a friendly name, and then navigates to that site.

HRESULT HlinkNavigateToStringReference(

LPCWSTR pwzTarget, | //String helping to identify the hyperlink target
LPCWSTR pwzLocation, | //Location within the hyperlink target of new hyperlink
IHlinkSite * pihlsite, | //Site object interface for the new hyperlink object
DWORD dwSiteData, | //Additional site data for the new hyperlink object
IHlinkFrame * pihlframe, | //Frame object interface for the new hyperlink object
DWORD grfHLNF, | //Navigation flags
LPBC pibc, | //Bind context object
IBindStatusCallback * pibsc, | //Bind status callback object
IHlinkBrowseContext * pihlbc | //Browse context object
); |

Parameters

pwzTarget
  [in] Pointer to the string which helps identify the hyperlink target. This string is resolved into a moniker for underlying binding operations via MkParseDisplayNameEx. Must not be NULL.
pwzLocation
  [in] Pointer to the location within the hyperlink target of new hyperlink object.
pihlsite
  [in] Pointer to the IHlinkSite interface on the site object for the new hyperlink object. This is optional, in which case szTarget must be an absolute reference.
dwSiteData
  [in] Additional site data for the new hyperlink object.
pihlframe
  [in] Pointer to the IHlinkFrame interface for the hyperlink frame object of the hyperlink container object. May be NULL if the hyperlink container does not have a hyperlink frame.
grfHLNF
  [in] Value taken from the HLNF enumeration.
pibc
  [in] Pointer to the IBindCtx interface on the bind context object to use for any moniker binding performed during the navigation. Must not be NULL.
pibsc
  [in] Pointer to the IBindStatusCallback interface on the bind-status-callback object 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.
pihlbc
  [in] IHlinkBrowseContext interface pointer to the browse context object to use for this navigation. The browse context includes history information in which this navigation is logged, if !(grfHLNF & HLNF_CREATENOHISTORY).

Return Values

S_OK
  A hyperlink site was created and navigated to.

Remarks

This helper function is identical to calling:

    // 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);
    phl->Release();

See Also

HLNF, HlinkNavigate, HlinkCreateFromString, HlinkSimpleNavigateToString