Creates a new hyperlink object from strings representing the hyperlink target, the location within the target, and a friendly name.
Syntax
HRESULT HlinkCreateFromString( LPCWSTR pwzTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName, IHlinkSite *pihlsite, DWORD dwSiteData, IUnknown *piunkOuter, REFIID riid, Void *ppvObj );
Parameters
- pwzTarget
- [in] Address of the string to help identify the hyperlink target. This string is resolved into a moniker through MkParseDisplayNameEx.
- pwzLocation
- [in] Address of the string representing the location within the hyperlink target for the new hyperlink. This must not be NULL.
- pwzFriendlyName
- [in] Address of the string to use as the friendly name for the hyperlink. This is typically a display name referenced by the user interface.
- 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 browse context. If NULL, the new browse context 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 not NULL.
- ppvObj
- [out] On return, indirect pointer to the requested interface.
Return Value
Returns S_OK if a new hyperlink object was created.
Remarks
HlinkCreateFromString 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.
HlinkCreateFromString is typically used by hyperlink containers as part of the user interface for creating brand new hyperlinks, where the user fills in a form or dialog box of itemstarget, location, friendly namethat are used to construct the hyperlink.
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