<div class="content"><p> </p><p>The GetHostVolume method returns an interface pointer to the
volume object for the volume on which the <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_1fbc35d5-bcf5-4ce7-9449-4197a1671440" data-linktype="relative-path">virtual disk</a></span> backing
store file resides.<a id="Appendix_A_Target_139"></a><a aria-label="Product behavior note 139" href="6b2552ee-ba27-409f-99a8-18841573327a#Appendix_A_139" data-linktype="relative-path">&lt;139&gt;</a></p><dl>
<dd>
<div><pre> HRESULT GetHostVolume(
   [out] IVdsVolume** ppVolume
 );
</pre></div>
</dd></dl><p><b>ppVolume: </b>Pointer to a variable that receives
an <span><a href="555601e2-1103-4423-b62b-0b1f3d3370e6" data-linktype="relative-path">IVdsVolume (section 3.1.13.1)</a></span>
interface pointer for the volume. Callers MUST release the interface pointer
when it is no longer needed by calling the <b>IUnknown::Release</b> method.</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
following parameters:</p><ul><li><p><span><span> 
</span></span>Verify that <i>ppVolume</i> is not NULL.</p>
</li></ul><p>The server MUST perform the following:</p><ul><li><p><span><span> 
</span></span>Search all software providers for the <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_9a876829-33a1-4f0b-8b81-8552b7e5561c" data-linktype="relative-path">volume</a></span> object on
which the virtual disk file resides.</p>
</li><li><p><span><span> 
</span></span>If the volume object is found, <i>ppVolume</i> MUST be set to the
IVdsVolume interface exposed by the volume and MUST return the value of zero;
if the volume object is not found, then the server MUST return the HRESULT
error VDS_E_OBJECT_NOT_FOUND.</p>
</li></ul></div>