创建一个用于枚举数据对象的 FORMATETC 结构的对象。这些结构用于对 IDataObject.GetData 或 IDataObject.SetData 的调用中。
命名空间: Microsoft.VisualStudio.Data.Framework
程序集: Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)
语法
声明
Private Function EnumFormatEtc ( _
dwDirection As UInteger, _
<OutAttribute> ByRef ppenumFormatEtc As IEnumFORMATETC _
) As Integer Implements IDataObject.EnumFormatEtc
int IDataObject.EnumFormatEtc(
uint dwDirection,
out IEnumFORMATETC ppenumFormatEtc
)
private:
virtual int EnumFormatEtc(
unsigned int dwDirection,
[OutAttribute] IEnumFORMATETC^% ppenumFormatEtc
) sealed = IDataObject::EnumFormatEtc
private abstract EnumFormatEtc :
dwDirection:uint32 *
ppenumFormatEtc:IEnumFORMATETC byref -> int
private override EnumFormatEtc :
dwDirection:uint32 *
ppenumFormatEtc:IEnumFORMATETC byref -> int
JScript 不支持显式接口实现。
参数
- dwDirection
类型:System.UInt32
从指定数据的方向 DATADIR 枚举的值。
- ppenumFormatEtc
类型:Microsoft.VisualStudio.OLE.Interop.IEnumFORMATETC%
Out 参数。当此方法返回时,包含对使用的enumerator对象枚举数据对象的 FORMATETC 结构。
返回值
类型:System.Int32
此方法支持该条件返回值 E_INVALIDARG 和 E_OUTOFMEMORY,以及示:
值 |
说明 |
---|---|
S_OK |
已成功创建枚举数对象。 |
E_NOTIMPL |
dwDirection 指定的方向不受支持。 |
OLE_S_USEREG |
OLE 枚举注册表中的格式的请求。 |
实现
IDataObject.EnumFormatEtc(UInt32, IEnumFORMATETC%)
异常
异常 | 条件 |
---|---|
NotImplementedException | 当前剪贴板对象不通过失败的 System.Runtime.InteropServices.ComTypes.IDataObject 接口包装现有 IDataObject (从 Microsoft.VisualStudio.OLE.Interop 命名空间)和调用。 |
备注
如果剪贴板对象包装现有 IDataObject (从 Microsoft.VisualStudio.OLE.Interop 命名空间),此方法委托传递给相应的 EnumFormatEtc 的调用来自该命名空间。否则,但是,如果剪贴板对象可以包装现有 IDataObject,它尝试将调用为从 System.Runtime.InteropServices.ComTypes 命名空间的 EnumFormatEtc。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。