Rediger

Del via


GetLockStatus method of the Win32_EncryptableVolume class

The GetLockStatus method of the Win32_EncryptableVolume class indicates whether the contents of the volume are accessible from Windows.

Syntax

uint32 GetLockStatus(
  [out] uint32 LockStatus
);

Parameters

LockStatus [out]

Type: uint32

Specifies whether the contents of the volume are accessible from Windows.

Value Meaning
Unlocked
0
For a standard HDD:
The full contents of the volume are accessible. An unlocked volume is either fully decrypted or has the encryption key available in the clear on disk. The volume containing the current running operating system (for example, the running Windows volume) is always accessible and cannot be locked.
For an EHDD:
The band is perpetually unlocked.
Locked
1
For a standard HDD:
All or a portion of the contents of the volume are not accessible. A locked volume must be partially or fully encrypted and must not have the encryption key available in the clear on disk.
For an EHDD:
The band is unlocked or locked.

 

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

Use the UnlockWithExternalKey and UnlockWithNumericalPassword to get access to the volume contents. Use the Lock method to relinquish access to volume contents.

The volume that contains the currently running operating system is always accessible and cannot be locked.

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