Partager via


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 ( _
    ByRef format As FORMATETC, _
    <OutAttribute> ByRef medium As STGMEDIUM _
) Implements IDataObject.GetData
void IDataObject.GetData(
    ref FORMATETC format,
    out STGMEDIUM medium
)
private:
virtual void GetData(
    FORMATETC% format, 
    [OutAttribute] STGMEDIUM% medium
) sealed = IDataObject::GetData
private abstract GetData : 
        format:FORMATETC byref * 
        medium:STGMEDIUM byref -> unit  
private override GetData : 
        format:FORMATETC byref * 
        medium:STGMEDIUM byref -> unit
JScript does not support explicit interface implementations.

Parameters

  • format
    Type: System.Runtime.InteropServices.ComTypes.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.

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

    When this method returns, this parameter 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 that 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(FORMATETC%, STGMEDIUM%)

Remarks

This method delegates the call to the corresponding GetData from the System.Runtime.InteropServices.ComTypes namespace, assuming that the clipboard object is wrapping an existing IDataObject.

.NET Framework Security

See Also

Reference

ClipboardObject Class

Microsoft.VisualStudio.Data.Framework Namespace