DataObject.IDataObject.GetCanonicalFormatEtc(FORMATETC, FORMATETC) Método

Definição

Fornece uma estrutura padrão FORMATETC logicamente equivalente a uma estrutura mais complexa. Use este método para determinar se duas estruturas diferentes FORMATETC devolveriam os mesmos dados, eliminando a necessidade de renderização duplicada.

 virtual int System.Runtime.InteropServices.ComTypes.IDataObject.GetCanonicalFormatEtc(System::Runtime::InteropServices::ComTypes::FORMATETC % pformatetcIn, [Runtime::InteropServices::Out] System::Runtime::InteropServices::ComTypes::FORMATETC % pformatetcOut) = System::Runtime::InteropServices::ComTypes::IDataObject::GetCanonicalFormatEtc;
[System.Security.SecurityCritical]
int IDataObject.GetCanonicalFormatEtc(ref System.Runtime.InteropServices.ComTypes.FORMATETC pformatetcIn, out System.Runtime.InteropServices.ComTypes.FORMATETC pformatetcOut);
int IDataObject.GetCanonicalFormatEtc(ref System.Runtime.InteropServices.ComTypes.FORMATETC pformatetcIn, out System.Runtime.InteropServices.ComTypes.FORMATETC pformatetcOut);
[<System.Security.SecurityCritical>]
abstract member System.Runtime.InteropServices.ComTypes.IDataObject.GetCanonicalFormatEtc : FORMATETC * FORMATETC -> int
override this.System.Runtime.InteropServices.ComTypes.IDataObject.GetCanonicalFormatEtc : FORMATETC * FORMATETC -> int
abstract member System.Runtime.InteropServices.ComTypes.IDataObject.GetCanonicalFormatEtc : FORMATETC * FORMATETC -> int
override this.System.Runtime.InteropServices.ComTypes.IDataObject.GetCanonicalFormatEtc : FORMATETC * FORMATETC -> int
Function GetCanonicalFormatEtc (ByRef pformatetcIn As FORMATETC, ByRef pformatetcOut As FORMATETC) As Integer Implements IDataObject.GetCanonicalFormatEtc

Parâmetros

pformatetcIn
FORMATETC

Um ponteiro para uma FORMATETC estrutura, passado por referência, que define o formato, o meio e o dispositivo destino que o chamador gostaria de usar para recuperar dados numa chamada subsequente, como GetData(FORMATETC, STGMEDIUM). O TYMED membro não é significativo neste caso e deve ser ignorado.

pformatetcOut
FORMATETC

Quando este método retorna, contém um ponteiro para uma FORMATETC estrutura que contém a informação mais geral possível para uma renderização específica, tornando-a canonicamente equivalente a formatetcIn. O chamador deve alocar esta estrutura e o GetCanonicalFormatEtc(FORMATETC, FORMATETC) método deve preencher os dados. Para recuperar dados numa chamada subsequente, como GetData(FORMATETC, STGMEDIUM), o chamador usa o valor fornecido de formatOut, a menos que o valor fornecido seja null. Este valor é null se o método devolver DATA_S_SAMEFORMATETC. O TYMED membro não é significativo neste caso e deve ser ignorado. Este parâmetro é passado sem inicializar.

Devoluções

Este método suporta os valores padrão de retorno E_INVALIDARG, E_UNEXPECTED e E_OUTOFMEMORY, bem como os seguintes:

Valor Descrição
S_OK A estrutura devolvida FORMATETC é diferente da que foi aprovada.
DATA_S_SAMEFORMATETC As FORMATETC estruturas são as mesmas e null são devolvidas no pformatetcOut parâmetro.
DV_E_LINDEX Existe um valor inválido para lindex; atualmente, apenas -1 é suportado.
DV_E_FORMATETC Existe um valor inválido para o pformatetcIn parâmetro.
OLE_E_NOTRUNNING A aplicação não está a correr.

Implementações

Atributos

Observações

Este membro é uma implementação explícita de membro de interface. Só pode ser usado quando a DataObject instância é transmitida para uma IDataObject interface.

Aplica-se a