3.4.5.2.40.3 IVdsVDisk::GetHostVolume (Opnum 5)

The GetHostVolume method returns an interface pointer to the volume object for the volume on which the virtual disk backing store file resides.<139>

 HRESULT GetHostVolume(
   [out] IVdsVolume** ppVolume
 );

ppVolume: Pointer to a variable that receives an IVdsVolume (section 3.1.13.1) interface pointer for the volume. Callers MUST release the interface pointer when it is no longer needed by calling the IUnknown::Release method.

Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) 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 2.2.3.

When the server receives this message, it MUST validate the following parameters:

  • Verify that ppVolume is not NULL.

The server MUST perform the following:

  • Search all software providers for the volume object on which the virtual disk file resides.

  • If the volume object is found, ppVolume 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.