Share via


CComEnumImpl::Clone

STDMETHOD( Clone )( Base** ppEnum );

Return Value

A standard HRESULT value.

Parameters

ppEnum

[out] The enumerator interface on a newly created object cloned from the current enumerator.

Remarks

This method provides the implementation of the method by creating an object of type CComEnum, initializing it with the same array and iterator used by the current object, and returning the interface on the newly created object. Note that cloned enumerators never make their own copy (or take ownership) of the data used by the original enumerator. If necessary, cloned enumerators will keep the original enumerator alive (using a COM reference) to ensure that the data is available for as long as they need it.

CComEnumImpl OverviewClass Members

See Also

CComEnumImpl::Init