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 | 要检查的密码 |
|---|
返回值
| 0 | 文档未加密,或者提供的密码不是有效的所有者密码或用户密码 |
|---|---|
| 1 | 有效用户密码 2;有效所有者密码 3;有效所有者和用户密码 |