Share via


ClipboardObject.IDataObject.QueryGetData Method

Determines whether the data object is capable of rendering the data described in the FORMATETC structure. Objects attempting a paste or drop operation can call this method before calling IDataObject.GetData to get an indication of whether the operation will be successful.

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

Syntax

'Declaration
Private Function QueryGetData ( _
    pFormatetc As FORMATETC() _
) As Integer Implements IDataObject.QueryGetData
int IDataObject.QueryGetData(
    FORMATETC[] pFormatetc
)
private:
virtual int QueryGetData(
    array<FORMATETC>^ pFormatetc
) sealed = IDataObject::QueryGetData
private abstract QueryGetData : 
        pFormatetc:FORMATETC[] -> int  
private override QueryGetData : 
        pFormatetc:FORMATETC[] -> int
JScript does not support explicit interface implementations.

Parameters

Return Value

Type: System.Int32
This method supports the standard return values E_INVALIDARG, E_UNEXPECTED, and E_OUTOFMEMORY, as well as the following:

Value

Description

S_OK

A subsequent call to GetData will probably be successful.

DV_E_LINDEX

There is an invalid value for lindex; currently, only -1 is supported.

DV_E_FORMATETC

There is an invalid value for the pFormatetc parameter.

DV_E_TYMED

There is an invalid tymed value.

DV_E_DVASPECT

There is an invalid dwAspect value.

OLE_E_NOTRUNNING

The application is not running.

Implements

IDataObject.QueryGetData(array<FORMATETC[])

Remarks

If the clipboard object wraps an existing IDataObject (from the Microsoft.VisualStudio.OLE.Interop namespace), this method delegates the call to the corresponding QueryGetData from that namespace. Otherwise, it attempts to translate the call to the corresponding IDataObject.QueryGetData 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