Win32_EncryptableVolume 類別的 GetKeyProtectorNumericalPassword 方法

Win32_EncryptableVolume類別的GetKeyProtectorNumericalPassword方法會擷取適當類型的指定金鑰保護裝置的數值密碼。

金鑰保護裝置識別碼必須參考類型為「數值密碼」的金鑰保護裝置。

語法

uint32 GetKeyProtectorNumericalPassword(
  [in]  string VolumeKeyProtectorID,
  [out] string NumericalPassword
);

參數

VolumeKeyProtectorID [in]

類型: 字串

用來管理加密磁片區金鑰保護裝置的唯一字串識別碼。

NumericalPassword [out]

類型: 字串

字串,表示可用來解除鎖定對應磁片區的密碼。

數位密碼為 48 位數。 這些數位分成 8 組 6 位數,每個群組中的最後一個數位表示群組總和檢查碼值。 假設有六位數的群組標示為 x1、x2、x3、x4、x5 和 x6,總和檢查碼 x6 數位會計算為 –x1+x2–x3+x4–x5 mod 11。

數位群組會以連字號分隔。 因此,「xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx」是傳回密碼的格式。

傳回值

類型: uint32

此方法會在失敗時傳回下列其中一個代碼或另一個錯誤碼。

傳回碼/值 描述
S_OK
0 (0x0)
此方法成功。
FVE_E_LOCKED_VOLUME
2150694912 (0x80310000)
磁片區已鎖定。
E_INVALIDARG
2147942487 (0x80070057)
VolumeKeyProtectorID參數不會參考類型為「數值密碼」的金鑰保護裝置。
FVE_E_NOT_ACTI加值稅ED
2150694920 (0x80310008)
磁碟區上未啟用 BitLocker。 新增金鑰保護裝置以啟用 BitLocker。

 

備註

Managed 物件格式 (MOF) 檔案包含 Windows Management Instrumentation (WMI) 類別的定義。 MOF 檔案不會安裝為 Windows SDK 的一部分。 當您使用 伺服器管理員 新增相關聯的角色時,它們會安裝在伺服器上。 如需 MOF 檔案的詳細資訊,請參閱 Managed Object Format (MOF)

規格需求

需求
最低支援的用戶端
Windows Vista Enterprise、Windows Vista Ultimate [僅限傳統型應用程式]
最低支援的伺服器
Windows Server 2008 [僅限傳統型應用程式]
命名空間
Root\CIMV2\Security\MicrosoftVolumeEncryption
MOF
Win32_encryptablevolume.mof

另請參閱

Win32_EncryptableVolume