EncryptFile

安全性和簽章

說明

本頁介紹 PDFlibPas 中屬於「安全性和簽章」主題的 EncryptFile。API 名稱、參數、類別名稱、檔案名稱和字面值保持原樣,以便和 Delphi 函式庫及 DLL 進入點完全對應。

呼叫函式前請查看語法、參數和傳回值。程式碼區塊保留原始形式,便於範例直接複製使用。

語法

Delphi

Function TPDFlib.EncryptFile(Const InputFileName, OutputFileName, Owner, User: WideString; Strength, Permissions: Integer): Integer;

ActiveX

Function PDFlib::EncryptFile(InputFileName As String, OutputFileName As String, Owner As String, User As String, Strength As Long, Permissions As Long) As Long

DLL

int DLEncryptFile(int InstanceID, const wchar_t * InputFileName, const wchar_t * OutputFileName, const wchar_t * Owner, const wchar_t * User, int Strength, int Permissions);

參數

InputFileNameInputFileName 表示檔案路徑或檔案名稱。請為目前流程使用有效路徑,並保留 API 預期的編碼。
OutputFileNameOutputFileName 表示檔案路徑或檔案名稱。請為目前流程使用有效路徑,並保留 API 預期的編碼。
OwnerOwnerEncryptFile 的參數。請使用簽章中顯示的型別,並提供與目前 PDF 文件、所選頁面或作用中資源一致的值。
UserUserEncryptFile 的參數。請使用簽章中顯示的型別,並提供與目前 PDF 文件、所選頁面或作用中資源一致的值。
StrengthStrengthEncryptFile 的參數。請使用簽章中顯示的型別,並提供與目前 PDF 文件、所選頁面或作用中資源一致的值。
PermissionsPermissionsEncryptFile 的參數。請使用簽章中顯示的型別,並提供與目前 PDF 文件、所選頁面或作用中資源一致的值。

傳回值

0此值說明 EncryptFile 的呼叫結果。通常非零值表示成功,0 表示操作未完成。
1此值說明 EncryptFile 的呼叫結果。通常非零值表示成功,0 表示操作未完成。