Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IDataObject Interface

Provides the managed definition of the IDataObject interface.

Namespace:  System.Runtime.InteropServices.ComTypes
Assembly:  System (in System.dll)
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[GuidAttribute("0000010E-0000-0000-C000-000000000046")]
public interface IDataObject

The IDataObject type exposes the following members.

  NameDescription
Public methodDAdviseCreates a connection between a data object and an advisory sink. This method is called by an object that supports an advisory sink and enables the advisory sink to be notified of changes in the object's data.
Public methodDUnadviseDestroys a notification connection that had been previously established.
Public methodEnumDAdviseCreates an object that can be used to enumerate the current advisory connections.
Public methodEnumFormatEtcCreates an object for enumerating the FORMATETC structures for a data object. These structures are used in calls to GetData or SetData.
Public methodGetCanonicalFormatEtcProvides a standard FORMATETC structure that is logically equivalent to a more complex structure. Use this method to determine whether two different FORMATETC structures would return the same data, removing the need for duplicate rendering.
Public methodGetDataObtains data from a source data object. The GetData method, which is called by a data consumer, renders the data described in the specified FORMATETC structure and transfers it through the specified STGMEDIUM structure. The caller then assumes responsibility for releasing the STGMEDIUM structure.
Public methodGetDataHereObtains data from a source data object. This method, which is called by a data consumer, differs from the GetData method in that the caller must allocate and free the specified storage medium.
Public methodQueryGetDataDetermines whether the data object is capable of rendering the data described in the FORMATETC structure. Objects attempting a paste or drop operation can call this method before calling GetData to get an indication of whether the operation may be successful.
Public methodSetDataTransfers data to the object that implements this method. This method is called by an object that contains a data source.
Top

For more information about the IDataObject interface, see the MSDN Library.

The common language runtime throws an exception when a COM method in native code returns an HRESULT. For more information, see How to: Map HRESULTs and Exceptions.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.