ClipboardObject.IDataObject.GetCanonicalFormatEtc Method
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.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
Private Function GetCanonicalFormatEtc ( _
ByRef formatIn As FORMATETC, _
<OutAttribute> ByRef formatOut As FORMATETC _
) As Integer Implements IDataObject.GetCanonicalFormatEtc
int IDataObject.GetCanonicalFormatEtc(
ref FORMATETC formatIn,
out FORMATETC formatOut
)
private:
virtual int GetCanonicalFormatEtc(
FORMATETC% formatIn,
[OutAttribute] FORMATETC% formatOut
) sealed = IDataObject::GetCanonicalFormatEtc
private abstract GetCanonicalFormatEtc :
formatIn:FORMATETC byref *
formatOut:FORMATETC byref -> int
private override GetCanonicalFormatEtc :
formatIn:FORMATETC byref *
formatOut:FORMATETC byref -> int
JScript does not support explicit interface implementations.
Parameters
formatIn
Type: System.Runtime.InteropServices.ComTypes.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. The tymed member is not significant in this case and should be ignored.
formatOut
Type: System.Runtime.InteropServices.ComTypes.FORMATETC%When this method returns, this parameter 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, the caller uses the supplied value of pformatetcOut, unless the value supplied is nulla null reference (Nothing in Visual Basic). 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.
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 |
The returned FORMATETC structure is different from the one that was passed. |
DATA_S_SAMEFORMATETC |
The FORMATETC structures are the same and a null reference is returned in the formatOut parameter. |
DV_E_LINDEX |
There is an invalid value for lindex; currently, only -1 is supported. |
DV_E_FORMATETC |
There is an invalid value for the formatIn parameter. |
OLE_E_NOTRUNNING |
The application is not running. |
Implements
IDataObject.GetCanonicalFormatEtc(FORMATETC%, FORMATETC%)
Remarks
This method delegates the call to the corresponding GetCanonicalFormatEtc from the System.Runtime.InteropServices.ComTypes namespace, assuming that the clipboard object is wrapping an existing IDataObject.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.