Rediger

Del via


PrepareVolume method of the Win32_EncryptableVolume class

The PrepareVolume method of the Win32_EncryptableVolume class creates a BitLocker volume with the specified file system type of the discovery volume. This method must be called before the volume can be protected with any of the ProtectKeyWith* methods.

Syntax

uint32 PrepareVolume(
  [in] string DiscoveryVolumeType,
  [in] uint32 ForceEncryptionType
);

Parameters

DiscoveryVolumeType [in]

Type: string

A string that specifies the type of discovery volume.

Value Meaning
<none> No discovery volume. This value creates a native BitLocker volume.
<default> This value is the default behavior.
FAT32 This value creates a FAT32 discovery volume.

ForceEncryptionType [in]

Type: uint32

Integer that specifies the encryption type. This can be one of the following values.

Value Meaning
Unspecified
0
The encryption type is not specified.
Software
1
Software encryption.
Hardware
2
Hardware encryption.

Return value

Type: uint32

This method returns one of the following codes or another error code if it fails.

Return code/value Description
S_OK
0 (0x0)
The method was successful.

Remarks

If you do not call this method when enabling a BitLocker volume, it is the same as calling this method with the default value in the DiscoveryVolumeType parameter.

Requirements

Requirement Value
Minimum supported client
Windows 7 Enterprise, Windows 7 Ultimate [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]
Namespace
Root\CIMV2\Security\MicrosoftVolumeEncryption
MOF
Win32_encryptablevolume.mof

See also

Win32_EncryptableVolume