IEnumFORMATETC
The IEnumFORMATETC
interface is used to enumerate an array of FORMATETC
When to Implement
IEnumFORMATETC must be implemented by all data objects to support
calls to IDataObject::EnumFormatEtc
The order of
formats enumerated through the IEnumFORMATETC object should be the same
as the order that the formats would be in when placed on the clipboard.
Typically, this order starts with private data formats and ends with
presentation formats such as CF_METAFILEPICT.
When to Use
Call the
methods of IEnumFORMATETC when you need to enumerate the FORMATETC
structures defining the formats and media supported by a given data object.
This is necessary in most data transfer operations, such as clipboard and drag-and-drop,
so the object on the other end of the data transfer can determine whether the
appropriate format and media for the data is supported.
The
prototypes of the methods are as follows:
HRESULT Next(ULONG celt, FORMATETC
HRESULT
Skip(ULONG celt)
HRESULT
Reset(void)
HRESULT
Clone(IEnumFORMATETC ** ppenum)
See Also