Partager via


HlinkCreateShortcutFromMoniker function

[HlinkCreateShortcutFromMoniker 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 shortcut from a moniker.

Syntax

HRESULT HlinkCreateShortcutFromMoniker(
        DWORD    grfHLSHORTCUTF,
        IMoniker *pimkTarget,
        LPCWSTR  pwzLocation,
        LPCWSTR  pwzDir,
        LPCWSTR  pwzFileName,
  _Out_ LPWSTR   *ppwzShortcutFile,
        DWORD    dwReserved
);

Parameters

  • grfHLSHORTCUTF
    The shortcut image.

  • pimkTarget
    The address of an IMoniker interface on the hyperlink target.

  • pwzLocation
    The address of the string that represent the location in the hyperlink target for the new hyperlink. This must not be NULL.

  • pwzDir
    The shortcut directory.

  • pwzFileName
    The shortcut filename.

  • ppwzShortcutFile [out]
    The shortcut file.

  • dwReserved
    Reserved. Must be set to 0.

Return value

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

Requirements

Header

HLink.h

Library

HLink.Idl

DLL

Hlink.dll