Contents Index Topic Contents | ||
Previous Topic: HlinkCreateBrowseContext Next Topic: HlinkCreateFromMoniker |
HlinkCreateFromData
HRESULT HlinkCreateFromData( IDataObject* piDataObj, //Interface on target data from which to create the hyperlink IHlinkSite* pihlsite, //Interface on hyperlink site DWORD dwSiteData, //Additional site data IUnknown *piunkOuter, //Interface that controls aggregation REFIID riid, //Interface identifier on new hyperlink object Void ** ppvObj //Receives the requested interface's pointer );Creates a standard hyperlink object from a COM object that supports the IDataObject interface.
- Returns S_OK if the new hyperlink object was created successfully, or E_NOINTERFACE if the object did not support the riid interface.
- piDataObj
- [in] Address of the IDataObject interface on the data object of interest. Used to access the methods to retrieve the data from the object.
- pihlsite
- [in] Address of the IHlinkSite interface for the new hyperlink within its container.
- dwSiteData
- [in] Additional site data associated with the hyperlink site.
- 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. Typically IID_IHlink, or IID_IUnknown when punkOuter is non-NULL.
- ppvObj
- [out] On return, indirect pointer to the requested interface.
Typically, this object originates from a data transfer operation, such as copying to and pasting from the clipboard, or through a drag-and-drop operation.
HlinkCreateFromData 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.
HlinkCreateFromData is typically used by a hyperlink container as part of a user interface that creates new hyperlinks through the clipboard or a drag-and-drop operation.
See also HlinkCreateFromMoniker, HlinkCreateFromString, HlinkQueryCreateFromData
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.