CheckPasswordA

Security and Signatures

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to CheckPassword and string arguments are interpreted using the current SetAnsiMode code page

Determines if a password is a valid password for the selected document

This is useful when the document has been opened with the user password but confirmation should be obtained from the user before changing security settings

Syntax

Delphi

Function DLCheckPasswordA(InstanceID: Integer; Password: PAnsiChar): Integer;

DLL

int DLCheckPasswordA(int InstanceID, const char * Password);

Parameters

PasswordThe password to check

Return values

0The document is not encrypted or the supplied password is not a valid owner or user password
1Valid user password 2 Valid owner password 3 Valid owner and user password