IVdsVolumeShrink::QueryMaxReclaimableBytes method (vds.h)

[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]

Retrieves the maximum number of bytes that can be reclaimed from the current volume.

Syntax

HRESULT QueryMaxReclaimableBytes(
  [out] ULONGLONG *pullMaxNumberOfReclaimableBytes
);

Parameters

[out] pullMaxNumberOfReclaimableBytes

Pointer to a variable that upon successful completion receives the maximum number of bytes which can be reclaimed from the current volume. This number will always be a multiple of the file system cluster size, which is in turn a multiple of the disk sector size. This parameter is required and cannot be null.

Return value

This method can return standard HRESULT values, such as E_INVALIDARG or E_OUTOFMEMORY, and VDS-specific return values. It can also return converted system error codes using the HRESULT_FROM_WIN32 macro. Errors can originate from VDS itself or from the underlying VDS provider that is being used. Possible return values include the following.

Return code/value Description
S_OK
The method completed successfully.
VDS_E_CANNOT_SHRINK
0x8004251EL
The volume cannot be shrunk because the file system does not support it.
VDS_E_DISK_REMOVEABLE
0x8004255AL
The operation is not supported on removable media.
RPX_X_NULL_REF_POINTER
0x800706F4
The pullMaxNumberOfReclaimableBytes parameter was null on input.

Remarks

This method can return more reclaimable bytes than are actually available.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header vds.h
Library Uuid.lib

See also

IVdsVolumeShrink