DecryptFileA
Document management, 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 DecryptFile and string arguments are interpreted using the current SetAnsiMode code page
This function attempts to remove the encryption from a file on disk, saving the decrypted document to a new file.
This function will succeed even if the user password is supplied (including an valid blank password) rather than the master password. Developers are advised that they should respect the security wishes of the document's author.
Syntax
Delphi
Function DLDecryptFileA(InstanceID: Integer; InputFileName, OutputFileName, Password: PAnsiChar): Integer;
DLL
int DLDecryptFileA(int InstanceID, const char * InputFileName, const char * OutputFileName, const char * Password);
Parameters
| InputFileName | The name of the file to decrypt. |
|---|---|
| OutputFileName | The name of the destination file to create. If this file already exists it will be overwritten. |
| Password | The password to use when decrypting the file. |
Return values
| 0 | The document could not be decrypted. Check the result of the LastErrorCode function to determine the cause of the failure. |
|---|---|
| 1 | The document was decrypted successfully |