Creates a new system hyperlink object from a moniker, a location string, and a friendly name string (used for displaying the hyperlink).
Syntax
HRESULT HlinkCreateFromMoniker( IMoniker *pimkTrgt, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName, IHlinkSite *pihlsite, DWORD dwSiteData, IUnknown *piunkOuter, REFIID riid, Void *ppvObj );
Parameters
- pimkTrgt
- [in] Address of the moniker to the hyperlink target for the new hyperlink. This must not be NULL.
- pwzLocation
- [in] Address of a named location within the hyperlink target that resolves to the hyperlink reference.
- pwzFriendlyName
- [in] Address of a string to use as the display name for the hyperlink.
- pihlsite
- [in] Address of the IHlinkSite object for the new hyperlink within the hyperlink container.
- dwSiteData
- [in] Additional site data for the new hyperlink object.
- piunkOuter
- [in] Address of the controlling IUnknown interface for the new hyperlink object. If NULL, the new hyperlink object is not aggregated.
- riid
- [in] Used to identify the interface to return on the new hyperlink. This is typically IID_IHlink, or IID_IUnknown when piunkOuter is non-NULL.
- ppvObj
- [out] Indirect pointer to the requested interface.
Return Value
Returns S_OK if successful.
Remarks
HlinkCreateFromMoniker is one of three helper functions that you can use to create a hyperlink. HlinkCreateFromData creates a hyperlink from a COM object that supports both the IDataObject interface and a hyperlink format CF_HYPERLINK on that IDataObject interface. HlinkQueryCreateFromData is typically called before the call to HlinkCreateFromData to determine if both these conditions are met. To create a hyperlink from a COM object for which you know the moniker, use HlinkCreateFromMoniker. To create a hyperlink from a COM object for which you have the name but not the moniker, use HlinkCreateFromString.
HlinkCreateFromMoniker creates new hyperlinks from an existing target moniker, a location string within the target, and a friendly name string used to identify how to display the hyperlink. This method's typical use is as part of a user interface for creating new hyperlinks from existing hyperlinks, or for editing existing hyperlinks, using a dialog box or form to prompt for the strings. This function is significantly faster than HlinkCreateFromString.
Function Information
Windows NT Use version 4.0. Windows Use Windows 95 and later. Header Hlink.h Import Library Hlink.lib Minimum availability Internet Explorer 3.0