IEnumX::Clone

HRESULT IEnumX::Clone(IEnumX **ppenum);

Retrieves another enumerator containing the same enumeration state as the current one.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
E_OUTOFMEMORY
E_UNEXPECTED

ppenum

[out] Address of a variable that receives the cloned enumerator. The type of this parameter is the same as the enumerator name. For example, if the enumerator name is IEnumFORMATETC, this parameter is of the IEnumFORMATETC type.

Using Clone, it is possible to record a particular point in the enumeration sequence and then return to that point at a later time. The enumerator returned is of the same interface type as the one being cloned.