HlinkCreateExtensionServi...     HlinkCreateFromMoniker Fu...     Hyperlinks Functions    
Web Workshop (Miscellaneous)

HlinkCreateFromData Function


Creates a standard hyperlink object from a COM object that supports the IDataObject interface.

Syntax

HRESULT HlinkCreateFromData(
    IDataObject *piDataObj,    
    IHlinkSite *pihlsite,      
    DWORD dwSiteData,          
    IUnknown *piunkOuter,      
    REFIID riid,       
    Void **ppvObj     
);

Parameters

piDataObj
[in] Address of the IDataObject interface on the data object of interest. This is 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. This is typically IID_IHlink, or IID_IUnknown when piunkOuter is not NULL.
ppvObj
[out] Indirect pointer to the requested interface.

Return Value

Returns S_OK if the new hyperlink object was created successfully, or E_NOINTERFACE if the object did not support the riid interface.

Remarks

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.

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


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.