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.
  IpenumFORMATETC **ppenumfmtetc
                 //Address of output variable that receives the 
                 // IEnumFORMATETC interface pointer
);
 

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] Address of IEnumFORMATETC* pointer variable that receives the interface pointer to 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.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in objbase.h.
  Import Library: Included as a resource in ole32.dll.

See Also

RegisterFormatEnumerator, RevokeFormatEnumerator