ClipboardObject.IDataObject.EnumFormatEtc 方法

创建一个用于枚举数据对象的 FORMATETC 结构的对象。 这些结构用于对 IDataObject.GetDataIDataObject.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
    类型:UInt32

    从指定数据的方向的 DATADIR 枚举的值。

  • ppenumFormatEtc
    类型:IEnumFORMATETC%

    Out 参数。 当此方法返回时,包含对枚举数的对象的引用枚举数据对象的 FORMATETC 结构。

返回值

类型: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 安全性

请参阅

参考

ClipboardObject 类

Microsoft.VisualStudio.Data.Framework 命名空间