ClipboardObject.IDataObject.EnumFormatEtc Method

Creates an object for enumerating the FORMATETC structures for a data object. These structures are used in calls to IDataObject.GetData or IDataObject.SetData.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'Declaration
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 does not support explicit interface implementations.

Parameters

  • dwDirection
    Type: System.UInt32

    A value from the DATADIR enumeration that specifies the direction of the data.

Return Value

Type: System.Int32
This method supports the standard return values E_INVALIDARG and E_OUTOFMEMORY, as well as the following:

Value

Description

S_OK

The enumerator object was successfully created.

E_NOTIMPL

The direction specified by dwDirection is not supported.

OLE_S_USEREG

Requests that OLE enumerate the formats from the registry.

Implements

IDataObject.EnumFormatEtc(UInt32, IEnumFORMATETC%)

Exceptions

Exception Condition
NotImplementedException

The current clipboard object does not wrap an existing IDataObject (from the Microsoft.VisualStudio.OLE.Interop namespace), and the call through the System.Runtime.InteropServices.ComTypes.IDataObject interface failed.

Remarks

If the clipboard object wraps an existing IDataObject (from the Microsoft.VisualStudio.OLE.Interop namespace), this method delegates the call to the corresponding EnumFormatEtc from that namespace. Otherwise, it attempts to translate the call to EnumFormatEtc from the System.Runtime.InteropServices.ComTypes namespace in case the clipboard object could be wrapping an existing IDataObject.

.NET Framework Security

See Also

Reference

ClipboardObject Class

Microsoft.VisualStudio.Data.Framework Namespace