3.3.4.4 IEnumVARIANT::Clone (Opnum 6)

The IEnumVARIANT::Clone method creates a copy of the current state of the enumeration.

 HRESULT Clone(
   [out] IEnumVARIANT** ppEnum
 );

ppEnum: MUST be set to an instance of the enumeration.

Return Values: The method MUST return information in an HRESULT data structure, defined in [MS-ERREF] section 2.1. The severity bit in the structure identifies the following conditions:

  • If the severity bit is set to 0, the method completed successfully.

  • If the severity bit is set to 1, the method failed and encountered a fatal error.

The server MUST create a new COM server that implements IEnumVARIANT. The state of the newly created IEnumVARIANT server MUST be set according to the type of the current server:

  • If the original server is a static or semi-static server, the state of the new COM server MUST be based on the current state of the enumeration.

  • If the original server is a dynamic server, the state of the new COM server MUST be based on the current state of the underlying collection, and the current position in the sequence.