SetQualifiedPartitionDeviceElement method of the BcdObject class

Sets a qualified boot partition device.

Syntax

boolean SetQualifiedPartitionDeviceElement(
  [in] ULONG  Type,
  [in] ULONG  PartitionStyle,
  [in] PCWSTR DiskSignature,
  [in] PCWSTR PartitionIdentifier
);

Parameters

Type [in]

The element type. This parameter is one of the values from the following enumerations:

It can also be a custom element type created for your own use.

PartitionStyle [in]

The partition style. This property can be one of the following values.

Value Meaning
GPT
1
The partition is described in a GUID partition table (GPT).
MBR
0
The partition is described in a master boot record (MBR).

DiskSignature [in]

If the PartitionStyle parameter is GPT, the DiskSignature parameter is the disk signature as a GUID in string format (for example, "{7c69a706-eda5-11dd-bc09-001e4ce28b8f}"). If the PartitionStyle parameter is MBR, the DiskSignature parameter is the decimal MBR disk signature in string format (for example, "402653184" for 0x18000000).

PartitionIdentifier [in]

If the PartitionStyle parameter is GPT, the PartitionIdentifier parameter is the partition signature as a GUID in string format (for example, "{6efb52bf-1766-41db-a6b3-0ee5eff72bd7}" ). If the PartitionStyle parameter is MBR, the PartitionIdentifier parameter is the decimal MBR partition offset in string format (for example, "82837504" for 0x4F00000).

Remarks

The BcdDeviceQualifiedPartitionData data type uniquely identifies a boot partition device by its type, disk signature, and partition identifier. An application can enumerate a qualified partition by using the GetElementWithFlags method with the Flags parameter set to Qualified (1).

Requirements

Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]
Namespace
Root\WMI
MOF
Bcd.mof

See also

BcdDeviceQualifiedPartitionData

BcdObject

GetElementWithFlags