3.4.5.2.37.1 IVdsVolumeShrink::QueryMaxReclaimableBytes (Opnum 3)

The QueryMaxReclaimableBytes method retrieves the maximum number of bytes that can be reclaimed from the current volume.

 HRESULT QueryMaxReclaimableBytes(
   [out] ULONGLONG* pullMaxNumberOfReclaimableBytes
 );

pullMaxNumberOfReclaimableBytes: A pointer to a variable that, if the operation is successfully completed, receives the maximum number of bytes that can be reclaimed from the current volume. This number is always a multiple of the file system cluster size, which is in turn a multiple of the disk sector size.

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 parameter:

  • Verify that pullMaxNumberOfReclaimableBytes is not NULL.

The server MUST set values that pullMaxNumberOfReclaimableBytes references with the maximum number of bytes that can be reclaimed from the volume and then return an HRESULT indicating failure or success.