Export (0) Print
Expand All

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

Namespace:  System.Runtime.InteropServices.ComTypes
Assembly:  System (in System.dll)

'Declaration
Function QueryGetData ( _
	ByRef format As FORMATETC _
) As Integer

Parameters

format
Type: System.Runtime.InteropServices.ComTypes.FORMATETC

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

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 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.

For more information about IDataObject::QueryGetData, see the MSDN Library.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft