# CreateFormatEnumerator

Creates an object that implements IEnumFORMATETC over a static array of FORMATETC structures.

HRESULT CreateFormatEnumerator(

UINT cfmtetc, | //Number of FORMATETC structures in rgfmtetc
FORMATETC *rgfmtetc, | //Static array of formats.
IEnumFORMATETC **ppenumfmtetc | //Indirect pointer to enumerator object
); |

Parameters

cfmtetc
  [in] Number of FORMATETC structures in the static array specified by the rgfmtetc parameter. The cfmtetc parameter cannot be zero.
rgfmtetc
  [in] Pointer to a static array of FORMATETC structures.
ppenumfmtetc
  [out] Indirect pointer to the IEnumFORMATETC interface on the enumerator object.

Return Values

S_OK
  The operation was successful.
E_INVALIDARG
  One or more parameters are invalid.

Remarks

The CreateFormatEnumerator function creates an enumerator object that implements IEnumFORMATETC over a static array of FORMATETC structures. The cfmtetc parameter specifies the number of these structures. With the pointer, you can call the standard enumeration methods to enumerate the structures, as described in the IEnumXXX reference.

See Also

RegisterFormatEnumerator, RevokeFormatEnumerator