<div class="content" name="QueryVDisks" uuid="6df739a2-e254-4701-96e6-6857d6d35e13"><p>The QueryVDisks method returns a list of <a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_1fbc35d5-bcf5-4ce7-9449-4197a1671440" data-linktype="relative-path">virtual disks</a> that are
managed by the provider.</p><dl>
<dd>
<div><pre> HRESULT QueryVDisks(
   [out] IEnumVdsObject** ppEnum
 );
</pre></div>
</dd></dl><p><b>ppEnum: </b>A pointer to an <a href="29084d98-40c8-4a10-a45e-4cfc0d8f8f03" data-linktype="relative-path">IEnumVdsObject (section 3.1.1.1)</a>
interface. If the operation is successfully completed, the pointer receives the
IEnumVdsObject interface of the object, which contains an enumeration of
virtual disk objects in the provider. Callers MUST release the interface when
they are finished with it.</p><p><b>Return Values: </b>The method MUST return zero or
a nonerror <a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_799103ab-b3cb-4eab-8c55-322821b2b235" data-linktype="relative-path">HRESULT</a> (as
specified in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>)
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 <a href="5102cc53-3143-4268-ba4c-6ea39e999ab4" data-linktype="relative-path">2.2.3</a>.</p><p>When the server receives this message, it MUST validate the
following parameter:</p><ul><li><p><span><span> 
</span></span>Verify that <i>ppEnum</i> is not NULL.</p>
</li></ul><p>The server MUST point <i>ppEnum</i> to an IEnumVdsObject
interface that contains the enumeration of virtual disk objects in the list of
cached storage management objects that have their provider pointer set to this
provider object. The server MUST then return an <a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path"><span>HRESULT</span></a> to indicate
failure or success.</p><p>For details on enumeration objects, see section <a href="4f084d4d-5fc8-49af-b54d-572fa506cdfe" data-linktype="relative-path">2.2.2.18.1</a>.</p></div>