Export (0) Print
Expand All

IDataObject::SetData Method

Transfers data to the object that implements this method. This method is called by an object that contains a data source.

Namespace:  System.Runtime.InteropServices.ComTypes
Assembly:  System (in System.dll)

void SetData(
	[InAttribute] FORMATETC% formatIn, 
	[InAttribute] STGMEDIUM% medium, 
	bool release
)

Parameters

formatIn
Type: System.Runtime.InteropServices.ComTypes::FORMATETC%

A FORMATETC structure, passed by reference, that defines the format used by the data object when interpreting the data contained in the storage medium.

medium
Type: System.Runtime.InteropServices.ComTypes::STGMEDIUM%

A STGMEDIUM structure, passed by reference, that defines the storage medium in which the data is being passed.

release
Type: System::Boolean

true to specify that the data object called, which implements SetData, owns the storage medium after the call returns. This means that the data object must free the medium after it has been used by calling the ReleaseStgMedium function. false to specify that the caller retains ownership of the storage medium, and the data object called uses the storage medium for the duration of the call only.

For more information about IDataObject::SetData, see the MSDN Library.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

Show:
© 2014 Microsoft