18.104.22.168.2.1 IVolumeClient2::GetMaxAdjustedFreeSpace (Opnum 3)
HRESULT GetMaxAdjustedFreeSpace( [in] LdmObjectId diskId, [out] LONGLONG* maxAdjustedFreeSpace );
diskId: Specifies the OID of the disk to query.
maxAdjustedFreeSpace: Pointer to the maximum free space on the disk, adjusted for partition boundaries.
Return Values: The method MUST return 0 or a nonerror HRESULT on success, or an implementation-specific nonzero error code on failure (as specified in [MS-ERREF]; see also section 2.2.1 for HRESULT values predefined by the Disk Management Remote Protocol).
Upon receiving this message, the server MUST validate parameters:
Verify that the disk specified by diskId is in the list of storage objects.<188>
Verify that maxAdjustedFreeSpace is not NULL.
If parameter validation fails, the server MUST fail the operation immediately, returning an appropriate error as its response to the client.
Otherwise, the server MUST compose a response to the client as follows:
Compute the maximum amount of free space in bytes that is available for allocation to new partitions and volumes. The computation MUST take into account any partition alignment rules enforced by the server.
The maximum amount of free space MUST be returned to the client in the output parameter maxAdjustedFreeSpace.
Return a response that contains the output parameters mentioned previously and the status of the operation.
The server MUST NOT change the list of storage objects as part of processing this message.