CheckPassword
安全與簽章
描述
判斷密碼是否為所選文件的有效密碼
文件以使用者密碼開啟、但變更安全性設定前應先向使用者確認時,這就很有用。
語法
Delphi
Function TPDFlib.CheckPassword(Const Password: WideString): Integer;
ActiveX
Function PDFlib::CheckPassword(Password As String) As Long
DLL
int DLCheckPassword(int InstanceID, const wchar_t * Password);
參數
| Password | The password to check |
|---|
傳回值
| 0 | 文件未加密,或提供的密碼不是有效的所有者/使用者密碼 |
|---|---|
| 1 | 有效的使用者密碼 2 有效的所有者密碼 3 所有者與使用者密碼皆有效 |