IDataObject.GetCanonicalFormatEtc(IntPtr, IntPtr) 方法

定义

检索指向标准 FORMATETC 结构的指针,该结构在逻辑上等效于(但不一定等于)a 参数引用的 FORMATETC 结构。Retrieves a pointer to a standard FORMATETC structure that is logically equivalent to, but not necessarily equal to, the FORMATETC structure that is referenced by the a parameter.

public:
 int GetCanonicalFormatEtc(IntPtr a, IntPtr b);
public int GetCanonicalFormatEtc (IntPtr a, IntPtr b);
abstract member GetCanonicalFormatEtc : nativeint * nativeint -> int
Public Function GetCanonicalFormatEtc (a As IntPtr, b As IntPtr) As Integer

参数

a
IntPtr

指向 FORMATETC 的指针,它为检索数据的调用定义格式、介质和目标设备。A pointer to the FORMATETC defining the format, medium, and target device for calls to retrieve data.

b
IntPtr

一个指向 FORMATETC 的输出指针,它包含特定呈现可能使用的最常见信息;如果 GetCanonicalFormatEtc 方法返回 DATA_S_SAMEFORMATETC,则为 nullAn output pointer to a FORMATETC containing the most general information possible for a specific rendering, or null if the GetCanonicalFormatEtc method returns DATA_S_SAMEFORMATETC.

返回

Int32

GetCanonicalFormatEtc 方法支持 E_INVALIDARG、E_UNEXPECTED 和 E_OUTOFMEMORY 等标准返回值以及下面的返回值:The GetCanonicalFormatEtc method supports the standard return values E_INVALIDARG, E_UNEXPECTED, and E_OUTOFMEMORY, as well as the following return values:

| 返回值 | 说明 | | --- | --- | |S_OK |返回的 FORMATETC 与参数中传递的结构不同。| Return value | Description | | --- | --- | | S_OK | The returned FORMATETC is different from the structure passed in the parameters. | | DATA_S_SAMEFORMATETC | 返回的 FORMATETC 与参数中传递的结构相同,并且 nullb 中返回。| | DATA_S_SAMEFORMATETC | The returned FORMATETC is the same as the structure passed in the parameters and null is returned in b. | | DV_E_LINDEX | 索引无效。| | DV_E_LINDEX | lindex is not valid. | | DV_E_FORMATETC | a 无效。| | DV_E_FORMATETC | a is not valid. | | OLE_E_NOTRUNNING | 对象应用程序未运行。| | OLE_E_NOTRUNNING | The object application is not running. |

注解

使用 GetCanonicalFormatEtc 方法,接口的实施者可以 IDataObject 返回规范结构, FORMATETC 而无需复制结构的呈现逻辑 FORMATETCThe GetCanonicalFormatEtc method allows the implementer of the IDataObject interface to return a canonical FORMATETC structure without duplicating the rendering logic for the FORMATETC structure.

有关通过 IDataObject 接口和 Microsoft 管理控制台 (mmc) 进行编程的详细信息,请参阅 Mmc 程序员指南For more information about programming with the IDataObject interface and the Microsoft Management Console (MMC), see the MMC Programmer's Guide.

适用于