Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DataObject.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.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

void IDataObject.SetData(
	ref FORMATETC pFormatetcIn,
	ref STGMEDIUM pmedium,
	bool fRelease
)

Parameters

pFormatetcIn
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.

pmedium
Type: System.Runtime.InteropServices.ComTypes.STGMEDIUM

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

fRelease
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.

Implements

IDataObject.SetData(FORMATETC, STGMEDIUM, Boolean)

This member is an explicit interface member implementation. It can be used only when the DataObject instance is cast to an IDataObject interface.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft