ConvertStyle method of the MSFT_Disk class

Converts the partition style of an already initialized disk.


UInt32 ConvertStyle(
  [in]  UInt16 PartitionStyle,
  [out] String ExtendedStatus


PartitionStyle [in]

The new partition style for the disk. This parameter is required.

MBR (1)

GPT (2)

ExtendedStatus [out]

A string that contains an embedded MSFT_StorageExtendedStatus object.

This parameter allows the storage provider to return extended (implementation-specific) error information.

Return value

Success (0)

Not Supported (1)

Unspecified Error (2)

Timeout (3)

Failed (4)

Invalid Parameter (5)

Disk is in use (6)

Access denied (40001)

There are not enough resources to complete the operation. (40002)

Cache out of date (40003)

The disk has not been initialized. (41000)

The disk is read only. (41002)

The disk is offline. (41003)

Operation not supported on a critical disk. (41009)

Cannot convert the style of a disk with data or other known partitions on it. (41013)

The disk is not large enough to support a GPT partition style. (41014)

The specified object is managed by the Microsoft Failover Clustering component. The disk must be removed from the cluster to perform this operation. (41019)


Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]

See also