IVCmdEnum::Clone
This method retrieves another enumerator that contains the same enumeration state as the current one.
Syntax
HRESULT Clone( IEnumXXX **ppenum);
Parameters
- ppenum
- [out] Pointer to 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.
Return Values
- NOERROR
- The method successfully retrieved the enumerator.
- E_INVALIDARG
- The argument is invalid.
- E_OUTOFMEMORY
- The system is out of memory.
- E_UNEXPECTED
- An unexpected error occurred.
Remarks
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.