Creates a new system hyperlink object from a moniker, a location string, and a friendly name string (used for displaying the hyperlink).
HRESULT HlinkCreateFromMoniker(
IMoniker * pimkTrgt, //Interface on hyperlink target moniker
LPCWSTR pwzLocation, //Named location of hyperlink reference
// within target
LPCWSTR pwzFriendlyName, //Display name of hyperlink
IHlinkSite * pihlsite, //Interface on hyperlink site
DWORD dwSiteData, //Additional site data
IUnknown * piunkOuter, //Whether or not object is part of an
// aggregate
REFIID riid, //Interface identifier on new hyperlink
// object
Void * ppvObj //Address of output variable that receives
// the interface pointer requested in riid
);
HlinkCreateFromMoniker is one of three helper functions that you can use to create a hyperlink. HlinkCreateFromData creates a hyperlink from a COM object which 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.
Windows NT: Use version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in hlink.h.
HlinkCreateFromData, HlinkCreateFromString, HlinkQueryCreateFromData