This topic has not yet been rated - Rate this topic

DataObject.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.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
int IDataObject.QueryGetData(
	ref FORMATETC formatetc
)

Parameters

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

Implements

IDataObject.QueryGetData(FORMATETC)

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

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, 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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.