Compartilhar via


OleDataObject.IDataObject.SetData Method

Transfers data from the client to the data object.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.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[]

    Pointer to the FORMATETC structure that defines the format, medium, and target device to use when passing the data. Only one medium can be specified in the tymed member of the FORMATETC structure. These values are valid:

    TYMED_STORAGE

    TYMED_STREAM

    TYMED_HGLOBAL

    TYMED_FILE

  • pmedium
    Type: array<Microsoft.VisualStudio.OLE.Interop.STGMEDIUM[]

    Pointer to the STGMEDIUM structure that defines the storage medium containing the data being transferred. The medium must be allocated by the caller and filled in by GetDataHere. The caller must also free the medium. The implementation of this method must always supply a value of NULL for the punkForRelease member of the STGMEDIUM structure to which this parameter points.

  • fRelease
    Type: Int32

    If TRUE, the data object called, which implements SetData, owns the storage medium after the call returns.

Implements

IDataObject.SetData(array<FORMATETC[], array<STGMEDIUM[], Int32)

.NET Framework Security

See Also

Reference

OleDataObject Class

Microsoft.VisualStudio.Shell Namespace