UnlockWithNumericalPassword method of the Win32_EncryptableVolume class

The UnlockWithNumericalPassword method of the Win32_EncryptableVolume class uses a provided numerical password to access the contents of a data volume.

The volume's encryption key must have been secured with one or more key protectors of the type "Numerical Password" (by using the ProtectKeyWithNumericalPassword method) to be able to unlock the volume with this method.

Note

If the disc supports hardware encryption this function sets the band status to "unlocked""

 

Syntax

uint32 UnlockWithNumericalPassword(
  [in] string NumericalPassword
);

Parameters

NumericalPassword [in]

Type: string

A string that specifies the numerical password.

The numerical password must contain 48 digits. These digits can be divided into 8 groups of 6 digits, with the last digit in each group indicating a checksum value for the group. Each group of 6 digits must be divisible by 11 and must be less than 65536. Assuming a group of six digits is labeled as x1, x2, x3, x4, x5, and x6, the checksum x6 digit is calculated as –x1+x2–x3+x4–x5 mod 11.

The groups of digits can optionally be separated by a space or hyphen. Therefore, "xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx" or "xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx" may also contain valid numerical passwords.

Return value

Type: uint32

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

If the volume is already unlocked and no other errors occur, this method returns 0.

Return code/value Description
S_OK
0 (0x0)
The method was successful.
FVE_E_NOT_ACTIVATED
2150694920 (0x80310008)
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker.
FVE_E_PROTECTOR_NOT_FOUND
2150694963 (0x80310033)
The volume does not have a key protector of the type "Numerical Password".
The NumericalPassword parameter has a valid format, but you cannot use a numerical password to unlock the volume.
FVE_E_FAILED_AUTHENTICATION
2150694951 (0x80310027)
The NumericalPassword parameter cannot unlock the volume.
One or more key protectors of the type "Numerical Password" exist, but the specified NumericalPassword parameter cannot unlock the volume.
FVE_E_INVALID_PASSWORD_FORMAT
2150694965 (0x80310035)
The NumericalPassword parameter does not have a valid format.

 

Remarks

Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Windows SDK. They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).

Requirements

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

See also

Win32_EncryptableVolume