Contents Index Topic Contents | ||
Previous Topic: HlinkCreateFromMoniker Next Topic: HlinkGetSpecialReference |
HlinkCreateFromString
HRESULT HlinkCreateFromString( LPCWSTR pwzTarget, //String helping to identify the hyperlink target LPCWSTR pwzLocation, //Location within the hyperlink target of new hyperlink object LPCWSTR pwzFriendlyName, //Friendly name of the hyperlink IHlinkSite * pihlsite, //Site for the new hyperlink object DWORD dwSiteData, //Additional site data for the new hyperlink object IUnknown * piunkOuter, //Whether or not object is part of an aggregate REFIID riid, //Interface identifier on new browse context object Void * ppvObj //Location of the requested interface's pointer );Creates a new hyperlink object from strings representing the hyperlink target, the location within the target, and a friendly name.
- Returns S_OK if a new hyperlink object was created.
- 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. 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. Typically IID_IHlink, or IID_IUnknown when punkOuter is non-NULL.
- ppvObj
- [out] On return, indirect pointer to the requested interface.
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.
See also HlinkCreateFromData, HlinkCreateFromMoniker, HlinkQueryCreateFromData
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.