创建一个用于枚举数据对象的 FORMATETC 结构的对象。这些结构用于对 IDataObject.GetData 或 IDataObject.SetData 的调用中。
命名空间: Microsoft.VisualStudio.Data.Framework
程序集: Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)
语法
声明
Private Function EnumFormatEtc ( _
direction As DATADIR _
) As IEnumFORMATETC Implements IDataObject.EnumFormatEtc
IEnumFORMATETC IDataObject.EnumFormatEtc(
DATADIR direction
)
private:
virtual IEnumFORMATETC^ EnumFormatEtc(
DATADIR direction
) sealed = IDataObject::EnumFormatEtc
private abstract EnumFormatEtc :
direction:DATADIR -> IEnumFORMATETC
private override EnumFormatEtc :
direction:DATADIR -> IEnumFORMATETC
JScript 不支持显式接口实现。
参数
- direction
类型:System.Runtime.InteropServices.ComTypes.DATADIR
从指定数据的方向 DATADIR 枚举的值。
返回值
类型:System.Runtime.InteropServices.ComTypes.IEnumFORMATETC
此方法支持该条件返回值 E_INVALIDARG 和 E_OUTOFMEMORY,以及示:
值 |
说明 |
---|---|
S_OK |
已成功创建枚举数对象。 |
E_NOTIMPL |
由 direction 参数指定的方向不受支持。 |
OLE_S_USEREG |
OLE 枚举注册表中的格式的请求。 |
实现
IDataObject.EnumFormatEtc(DATADIR)
备注
此方法将调用委托给从 System.Runtime.InteropServices.ComTypes 命名空间的相应 EnumFormatEtc,假定,剪贴板对象包装现有 IDataObject。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。