System.Runtime.InteropServices.ComTypes.IDataObject.EnumFormatEtc Method

Creates an object for enumerating the System.Runtime.InteropServices.ComTypes.FORMATETC structures for a data object. These structures are used in calls to IDataObject.GetData(FORMATETC@, STGMEDIUM@) or IDataObject.SetData(FORMATETC@, STGMEDIUM@, bool).

Syntax

public IEnumFORMATETC EnumFormatEtc (DATADIR direction)

Parameters

direction
One of the System.Runtime.InteropServices.ComTypes.DATADIR values that specifies the direction of the data.

Returns

This method supports the standard return values E_INVALIDARG and E_OUTOFMEMORY, as well as the following:

S_OK

The enumerator object was successfully created.

E_NOTIMPL

The direction specified by the direction parameter is not supported.

OLE_S_USEREG

Requests that OLE enumerate the formats from the registry.

Remarks

For more information about IDataObject::EnumFormatEtc, see the MSDN Library.

Requirements

Namespace: System.Runtime.InteropServices.ComTypes
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0