Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Initialize method of the MSFT_Disk class

Initializes a RAW disk with a particular partition style.

Syntax


UInt32 Initialize(
  [in]  UInt16 PartitionStyle,
  [out] String ExtendedStatus
);

Parameters

PartitionStyle [in]

The desired partition style for the disk. The default value for this parameter is GPT.

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 already been initialized. (41001)
The specified partition type is not valid. (41010)
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 in cluster maintenance mode and the cluster resource status must be online to perform this operation. (41018)

Remarks

If no partition style is specified, GPT will be selected by default. If the disk is already initialized, this method will fail with a well-defined error code.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Namespace

Root\Microsoft\Windows\Storage

MOF

Storagewmi.mof

See also

MSFT_Disk

 

 

Show: