3.4.5.2.21.5 IVdsDisk::ConvertStyle (Opnum 7)

The ConvertStyle method converts a disk's partitioning format.

 HRESULT ConvertStyle(
   [in] VDS_PARTITION_STYLE NewStyle
 );

NewStyle: A value from the VDS_PARTITION_STYLE enumeration that indicates the new partitioning format.

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.

When the server receives this message, it MUST convert the disk's partitioning format to the style NewStyle specifies and then return an HRESULT indicating failure or success.

A dynamic disk cannot be converted between GPT and MBR partitioning styles. The dynamic disk MUST be converted to a basic disk, at which point it can be converted between partitioning styles. Clients cannot change the partitioning style on a disk with volumes. Clients cannot change the partitioning style on a disk that contains the system, boot, pagefile, crashdump, or hibernation volumes.

If this method is called against a disk which contains volume or partition extents, then this method MUST return VDS_E_DISK_NOT_EMPTY.<89>