IDataObject.GetCanonicalFormatEtc(FORMATETC, FORMATETC) Método

Definición

Proporciona una estructura FORMATETC estándar que equivale lógicamente a una estructura más compleja. Utilice este método para determinar si dos estructuras FORMATETC diferentes devolverían los mismos datos, eliminando la necesidad de una representación duplicada.

public:
 int GetCanonicalFormatEtc(System::Runtime::InteropServices::ComTypes::FORMATETC % formatIn, [Runtime::InteropServices::Out] System::Runtime::InteropServices::ComTypes::FORMATETC % formatOut);
public int GetCanonicalFormatEtc (ref System.Runtime.InteropServices.ComTypes.FORMATETC formatIn, out System.Runtime.InteropServices.ComTypes.FORMATETC formatOut);
abstract member GetCanonicalFormatEtc : FORMATETC * FORMATETC -> int
Public Function GetCanonicalFormatEtc (ByRef formatIn As FORMATETC, ByRef formatOut As FORMATETC) As Integer

Parámetros

formatIn
FORMATETC

Puntero a una estructura FORMATETC, pasada por referencia, que define el formato, medio y dispositivo de destino que el llamador desearía utilizar para recuperar los datos en una llamada subsiguiente como GetData(FORMATETC, STGMEDIUM). El miembro TYMED no es importante en este caso y se debe omitir.

formatOut
FORMATETC

El resultado que devuelve este método contiene un puntero a una estructura FORMATETC que contiene la máxima información general posible para una representación concreta, haciendo que tenga una equivalencia canónica con formatetcIn. El llamador debe asignar esta estructura y el método GetCanonicalFormatEtc(FORMATETC, FORMATETC) debe rellenar los datos. Para recuperar los datos en una llamada subsiguiente como GetData(FORMATETC, STGMEDIUM), el llamador utiliza el valor proporcionado de formatOut, a menos que el valor proporcionado sea null. Este valor es null si el método devuelve DATA_S_SAMEFORMATETC. El miembro TYMED no es importante en este caso y se debe omitir. Este parámetro se pasa sin inicializar.

Devoluciones

Este método admite los valores devueltos estándar E_INVALIDARG, E_UNEXPECTED y E_OUTOFMEMORY, así como los valores siguientes:

Valor Descripción
S_OK La estructura FORMATETC devuelta es diferente de la que se ha pasado.
DATA_S_SAMEFORMATETC Las estructuras FORMATETC son iguales y se devuelve null en el parámetro formatOut.
DV_E_LINDEX Hay un valor no válido para lindex; actualmente, sólo se admite -1.
DV_E_FORMATETC Hay un valor no válido para el parámetro pFormatetc.
OLE_E_NOTRUNNING La aplicación no se está ejecutando.

Comentarios

Para obtener más información, vea Método IDataObject::GetCanonicalFormatEtc.

Se aplica a