<div class="content"><p> </p><p>The Clone method creates a new enumeration that has the same
state as the current enumeration.</p><dl>
<dd>
<div><pre> [helpstring(&#34;method Clone&#34;)] HRESULT Clone(
   [out] IEnumVdsObject** ppEnum
 );
</pre></div>
</dd></dl><p><b>ppEnum: </b>A pointer to an <span><a href="29084d98-40c8-4a10-a45e-4cfc0d8f8f03" data-linktype="relative-path">IEnumVdsObject</a></span>
interface that, if successfully completed, receives the IEnumVdsObject
interface of the cloned enumeration. Callers MUST release the interface that is
received when they are done with it.</p><p><b>Return Values:</b> The method MUST return zero or
a non-error <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_799103ab-b3cb-4eab-8c55-322821b2b235" data-linktype="relative-path">HRESULT</a></span> (as
specified in <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>)
to indicate success or return an implementation-specific nonzero error code to
indicate failure. For the HRESULT values predefined by the Virtual Disk Service
Remote Protocol, see section <span><a href="5102cc53-3143-4268-ba4c-6ea39e999ab4" data-linktype="relative-path">2.2.3</a></span>.</p><p>When the server receives this message, it MUST validate the
parameter:</p><ul><li><p><span><span> 
</span></span>Verify that <i>ppEnum</i> is not NULL.</p>
</li></ul><p>The server MUST perform the following:</p><ul><li><p><span><span> 
</span></span>Create a new enumeration object that implements the
IEnumVdsObject interface. Then set the pointer that <i>ppEnum</i> references to
the interface.</p>
</li><li><p><span><span> 
</span></span>Set the list of objects in the new enumeration object to equal
the list of objects in this enumeration.</p>
</li><li><p><span><span> 
</span></span>Set the current index in the new enumeration to equal the current
index in this enumeration.</p>
</li><li><p><span><span> 
</span></span>Return an HRESULT that indicates failure or success.</p>
</li></ul></div>