ClipboardObject.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: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
Private Sub SetData ( _
pFormatetc As FORMATETC(), _
pmedium As STGMEDIUM(), _
fRelease As Integer _
) Implements IDataObject.SetData
void IDataObject.SetData(
FORMATETC[] pFormatetc,
STGMEDIUM[] pmedium,
int fRelease
)
private:
virtual void SetData(
array<FORMATETC>^ pFormatetc,
array<STGMEDIUM>^ pmedium,
int fRelease
) sealed = IDataObject::SetData
private abstract SetData :
pFormatetc:FORMATETC[] *
pmedium:STGMEDIUM[] *
fRelease:int -> unit
private override SetData :
pFormatetc:FORMATETC[] *
pmedium:STGMEDIUM[] *
fRelease:int -> unit
JScript does not support explicit interface implementations.
Parameters
pFormatetc
Type: array<Microsoft.VisualStudio.OLE.Interop.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: array<Microsoft.VisualStudio.OLE.Interop.STGMEDIUM[]A STGMEDIUM structure, passed by reference, that defines the storage medium in which the data is being passed.
fRelease
Type: System.Int32true 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 that the data object called uses the storage medium for the duration of the call only.
Implements
IDataObject.SetData(array<FORMATETC[], array<STGMEDIUM[], Int32)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The clipboard object is not a wrapped Microsoft.VisualStudio.OLE.Interop.IDataObject and the pFormatetc and/or pmedium parameters are null. |
ArgumentException | The clipboard object is not a wrapped Microsoft.VisualStudio.OLE.Interop.IDataObject and the length of the pFormatetc and/or pmedium structure is zero. |
Remarks
If the clipboard object wraps an existing IDataObject (from the Microsoft.VisualStudio.OLE.Interop namespace), this method delegates the call to the corresponding SetData from that namespace. Otherwise, it attempts to translate the call to the corresponding IDataObject.SetData from the System.Runtime.InteropServices.ComTypes namespace, in case the clipboard object could be wrapping an existing IDataObject.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.