IDataObject.GetCanonicalFormatEtc(IntPtr, IntPtr) 方法
定义
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,则为 null。An 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.
返回
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 与参数中传递的结构相同,并且 null 在 b 中返回。| | 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 而无需复制结构的呈现逻辑 FORMATETC 。The 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.