Share via


Win32_EncryptableVolume 類別的 IsNumericalPasswordValid 方法

Win32_EncryptableVolume類別的IsNumericalPasswordValid方法會指出數值密碼是否符合這個驗證值的特殊格式需求。

語法

uint32 IsNumericalPasswordValid(
  [in]  string  NumericalPassword,
  [out] boolean IsNumericalPasswordValid
);

參數

NumericalPassword [in]

類型: 字串

指定數值密碼的字串。

數值密碼必須包含 48 位數。 這些數位可以分成 8 組 6 位數,每個群組中的最後一個數位表示群組總和檢查碼值。 每一組 6 位數都必須由 11 除,而且必須小於 720896。 假設一組六位數標示為 x1、x2、x3、x4、x5 和 x6,總和檢查碼 x6 數位會計算為 –x1+x2–x3+x4–x5 mod 11。

數位群組可以選擇性地以空格或連字號分隔。 因此,「xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx」 或 「xxxxxx xxxxxx」 也可能包含有效的數值密碼。

IsNumericalPasswordValid [out]

類型: 布林值

布林值,如果數值密碼符合這個驗證值的特殊格式需求,則為 true,否則值為 false。

傳回值

類型: uint32

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

傳回碼/值 描述
S_OK
0 (0x0)
此方法成功。

 

備註

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

規格需求

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

另請參閱

Win32_EncryptableVolume