Share via


ClipboardObject.IDataObject.GetCanonicalFormatEtc Method

Definition

Provides a standard FORMATETC structure that is logically equivalent to a more complex structure. Use this method to determine whether two different FORMATETC structures return the same data, removing the need for duplicate rendering.

 virtual int Microsoft.VisualStudio.OLE.Interop.IDataObject.GetCanonicalFormatEtc(cli::array <Microsoft::VisualStudio::OLE::Interop::FORMATETC> ^ pformatectIn, cli::array <Microsoft::VisualStudio::OLE::Interop::FORMATETC> ^ pformatetcOut) = Microsoft::VisualStudio::OLE::Interop::IDataObject::GetCanonicalFormatEtc;
int IDataObject.GetCanonicalFormatEtc (Microsoft.VisualStudio.OLE.Interop.FORMATETC[] pformatectIn, Microsoft.VisualStudio.OLE.Interop.FORMATETC[] pformatetcOut);
abstract member Microsoft.VisualStudio.OLE.Interop.IDataObject.GetCanonicalFormatEtc : Microsoft.VisualStudio.OLE.Interop.FORMATETC[] * Microsoft.VisualStudio.OLE.Interop.FORMATETC[] -> int
override this.Microsoft.VisualStudio.OLE.Interop.IDataObject.GetCanonicalFormatEtc : Microsoft.VisualStudio.OLE.Interop.FORMATETC[] * Microsoft.VisualStudio.OLE.Interop.FORMATETC[] -> int
Function GetCanonicalFormatEtc (pformatectIn As FORMATETC(), pformatetcOut As FORMATETC()) As Integer Implements IDataObject.GetCanonicalFormatEtc

Parameters

pformatectIn
FORMATETC[]

A reference to a FORMATETC structure, passed by reference, that defines the format, medium, and target device that the caller would like to use to retrieve data in a subsequent call, such as IDataObject.GetData(FORMATETC[], STGMEDIUM[]). The tymed member is not significant in this case and should be ignored.

pformatetcOut
FORMATETC[]

When this method returns, contains a pointer to a FORMATETC structure that contains the most general information possible for a specific rendering, making it canonically equivalent to pformatectIn. The caller must allocate this structure and the GetCanonicalFormatEtc method must fill in the data. To retrieve data in a subsequent call, such as IDataObject.GetData(FORMATETC[], STGMEDIUM[]), the caller uses the supplied value of pformatetcOut, unless the value supplied is null. This value is null if the method returns DATA_S_SAMEFORMATETC. The tymed member is not significant in this case and should be ignored. This parameter is passed uninitialized.

Returns

This method supports the standard return values E_INVALIDARG, E_FAIL, E_UNEXPECTED, and E_OUTOFMEMORY, as well as the following:ValueDescriptionS_OKThe returned FORMATETC structure is different from the one that was passed.DATA_S_SAMEFORMATETCThe FORMATETC structures are the same and a null reference is returned in the pformatetcOut parameter.DV_E_LINDEXThere is an invalid value for lindex; currently, only -1 is supported.DV_E_FORMATETCThere is an invalid value for the pformatectIn parameter.OLE_E_NOTRUNNINGThe application is not running.

Implements

Applies to