Partager via


HlinkSimpleNavigateToString function

[HlinkSimpleNavigateToString 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.

 

Executes a hyperlink jump to a new document or object.

Syntax

HRESULT HlinkSimpleNavigateToString(
  _In_       LPCWSTR             szTarget,
  _In_       LPCWSTR             szLocation,
  _In_       LPCWSTR             szTargetFrameName,
  _In_       IUnknown            *pUnk,
  _In_       IBindCtx            *pbc,
  _In_       IBindStatusCallback *pbsc,
  _In_       DWORD               grfHLNF,
  _Reserved_ DWORD               dwReserved
);

Parameters

  • szTarget [in]
    A string that helps identify the hyperlink target. This string is resolved into a moniker for underlying binding operations through MkParseDisplayNameEx. If this is NULL, the navigation is within a document. This parameter is required.

  • szLocation [in]
    Optional. A string that specifies the location within the hyperlink target for the new hyperlink.

  • szTargetFrameName [in]
    Optional. A string that specifies the name of the target frame for the hyperlink navigation. This argument only affects navigation within a document container that supports framesets.

  • pUnk [in]
    A pointer to the IUnknown interface on the document or object that is initiating the hyperlink. If this is 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, a valid value must be passed for this parameter for navigation to succeed.

  • pbc [in]
    A pointer to the IBindCtx interface on the bind context to use for any moniker binding performed during the navigation. This must not be NULL.

  • pbsc [in]
    A pointer to the IBindStatusCallback interface on the bind-status-callback to use for any asynchronous moniker binding performed during the navigation. The bind-status-callback returns only the standard IUnknown methods: AddRef and QueryInterface. When navigating in a new window, the only IBindStatusCallback method that gets called is IBindStatusCallback::GetBindInfo. If this is NULL, the caller does not receive progress notification, cancellation, pausing, or low-level binding information.

  • grfHLNF [in]
    An unsigned long integer value that specifies one of the HLNF values.

  • dwReserved [in]
    Reserved. Must be set to NULL.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This function is called by HlinkNavigateString. The HlinkSimpleNavigateToString helper function can be used by all applications, documents, and objects that have simple navigation requirements. The simple hyperlink navigation model enables a user to jump from one page to another page, but does not provide support for more complex operations, such as cutting and pasting hyperlinks. This function performs navigation if it originates in a hyperlink frame.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Urlmon.h

Library

Urlmon.lib

DLL

Urlmon.dll

See also

Reference

HlinkNavigateToStringReference

HlinkSimpleNavigateToMoniker

IHlink::Navigate