UnlockWithExternalKey method of the Win32_EncryptableVolume class
The UnlockWithExternalKey method of the Win32_EncryptableVolume class uses a provided external key 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 "External Key" using the ProtectKeyWithExternalKey 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 UnlockWithExternalKey(
[in] uint8 ExternalKey[]
);
Parameters
-
ExternalKey [in]
-
Type: uint8[]
An array of bytes that specifies the 256-bit external key used to unlock the volume. This key can be obtained by calling the GetExternalKeyFromFile method.
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, this method returns 0.
Return code/value | Description |
---|---|
|
The method was successful. |
|
The volume does not have a key protector of the type "External Key". |
|
One or more key protectors of the type "External Key" exist, but the specified ExternalKey parameter cannot unlock the volume. |
|
The ExternalKey parameter is not an array of size 4. |
|
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker. |
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 |
|
See also