3.4.5.2.24.2 IVdsAdvancedDisk::QueryPartitions (Opnum 4)
The QueryPartitions method enumerates a disk's partitions.
-
HRESULT QueryPartitions( [out, size_is(,*plNumberOfPartitions)] VDS_PARTITION_PROP** ppPartitionPropArray, [out] long* plNumberOfPartitions );
ppPartitionPropArray: A pointer to an array of VDS_PARTITION_PROP structures that, if the operation is successfully completed, receives the array of properties.
plNumberOfPartitions: A pointer to a variable that, if the operation is successfully completed, receives the total number of elements in ppPartitionPropArray partition.
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.
-
Note This method is not valid for CD/DVD or super floppy devices. These devices do not support partition tables.
When the server receives this message, it MUST validate the following parameters:
Verify that ppPartitionPropArray is not NULL.
Verify that plNumberOfPartitions is not NULL.
The server MUST point ppPartitionPropArray to an array of VDS_PARTITION_PROP structures that contains information about each partition on the disk, point plNumberOfPartitions to the number of elements in the array, and then return an HRESULT indicating failure or success.
If the disk has no partition format (it is not formatted as either MBR or GPT), then there are no partitions and this method MUST return VDS_E_DISK_NOT_INITIALIZED.