ClipboardObject.IDataObject.GetData Method

Obtains data from a source data object. This method is called by a data consumer. It 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.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'Declaration
Private Sub GetData ( _
    pformatetcIn As FORMATETC(), _
    pRemoteMedium As STGMEDIUM() _
) Implements IDataObject.GetData
void IDataObject.GetData(
    FORMATETC[] pformatetcIn,
    STGMEDIUM[] pRemoteMedium
)
private:
virtual void GetData(
    array<FORMATETC>^ pformatetcIn, 
    array<STGMEDIUM>^ pRemoteMedium
) sealed = IDataObject::GetData
private abstract GetData : 
        pformatetcIn:FORMATETC[] * 
        pRemoteMedium:STGMEDIUM[] -> unit  
private override GetData : 
        pformatetcIn:FORMATETC[] * 
        pRemoteMedium:STGMEDIUM[] -> unit
JScript does not support explicit interface implementations.

Parameters

  • pformatetcIn
    Type: array<Microsoft.VisualStudio.OLE.Interop.FORMATETC[]

    A reference to a FORMATETC structure, passed by reference, that defines the format, medium, and target device to use when passing the data. It is possible to specify more than one medium by using the Boolean OR operator, allowing the method to choose the best medium among those specified.

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

    When this method returns, contains a reference to the STGMEDIUM structure that indicates the storage medium containing the returned data through its tymed member, and the responsibility for releasing the medium through the value of its pUnkForRelease member. If pUnkForRelease is nulla null reference (Nothing in Visual Basic), the receiver of the medium is responsible for releasing it; otherwise, pUnkForRelease points to the IUnknown interface on the appropriate object so its Release method can be called. The medium must be allocated and filled in by this method. This parameter is passed uninitialized.

Implements

IDataObject.GetData(array<FORMATETC[], array<STGMEDIUM[])

Exceptions

Exception Condition
ArgumentNullException

The clipboard object is not a wrapped Microsoft.VisualStudio.OLE.Interop.IDataObject and the pformatetcIn and/or pRemoteMedium parameters are nulla null reference (Nothing in Visual Basic).

ArgumentException

The clipboard object is not a wrapped Microsoft.VisualStudio.OLE.Interop.IDataObject and the length of the pformatetcIn and/or pRemoteMedium structures are 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 GetData from that namespace. Otherwise, it attempts to translate the call to GetData from the System.Runtime.InteropServices.ComTypes namespace, in case the clipboard object could be wrapping an existing IDataObject.

.NET Framework Security

See Also

Reference

ClipboardObject Class

Microsoft.VisualStudio.Data.Framework Namespace