This documentation is archived and is not being maintained.

IDataObject.QueryGetData Method

Note: This method is new in the .NET Framework version 2.0.

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)

int QueryGetData (
	[InAttribute] ref FORMATETC format
)
int QueryGetData (
	/** @attribute InAttribute() */ /** @ref */ FORMATETC format
)
JScript does not support passing value-type arguments by reference.

Parameters

format

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

Return Value

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.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0
Show: