Bewerken

Delen via


DataObject.IDataObject.QueryGetData(FORMATETC) Method

Definition

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 GetData(FORMATETC, STGMEDIUM) to get an indication of whether the operation may be successful.

 virtual int System.Runtime.InteropServices.ComTypes.IDataObject.QueryGetData(System::Runtime::InteropServices::ComTypes::FORMATETC % formatetc) = System::Runtime::InteropServices::ComTypes::IDataObject::QueryGetData;
int IDataObject.QueryGetData (ref System.Runtime.InteropServices.ComTypes.FORMATETC formatetc);
abstract member System.Runtime.InteropServices.ComTypes.IDataObject.QueryGetData : FORMATETC -> int
override this.System.Runtime.InteropServices.ComTypes.IDataObject.QueryGetData : FORMATETC -> int
Function QueryGetData (ByRef formatetc As FORMATETC) As Integer Implements IDataObject.QueryGetData

Parameters

formatetc
FORMATETC

A pointer to a FORMATETC structure, passed by reference, that defines the format, medium, and target device to use for the query.

Returns

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(FORMATETC, STGMEDIUM) would probably be successful.
DV_E_LINDEX An invalid value for lindex; currently, only -1 is supported.
DV_E_FORMATETC An invalid value for the pFormatetc parameter.
DV_E_TYMED An invalid tymed value.
DV_E_DVASPECT An invalid dwAspect value.
OLE_E_NOTRUNNING The application is not running.

Implements

Remarks

This member is an explicit interface member implementation. It can be used only when the DataObject is cast to an IDataObject interface.

Applies to