DASetInformation

文件屬性、直接存取功能

描述

設定文件資訊區中的值

可能是 Author、Subject 這類標準資訊,也可能是自訂資訊

CreationDate 與 ModDate(修改日期)的日期格式應為:D:YYYYMMDDHHmmSSOHH'mm'

where

YYYY shall be the year

MM 為月份(01-12)DD 為日(01-31)HH 為小時(00-23)

mm 為分鐘(00-59) SS 為秒(00-59)

O 為本地時間與世界時間(UT)的關係,使用 +、- 或 Z 字元

HH 後接所有格符號(APOSTROPHE,U+0027)('),表示與 UT 的時差絕對值,單位小時(00-23)

mm 後可接所有格符號(APOSTROPHE,U+0027)('),表示與 UT 的時差絕對值,單位分鐘(00-59)

語法

Delphi

Function TPDFlib.DASetInformation(FileHandle: Integer; Const Key, NewValue: WideString): Integer;

ActiveX

Function PDFlib::DASetInformation(FileHandle As Long, Key As String, NewValue As String) As Long

DLL

int DLDASetInformation(int InstanceID, int FileHandle, const wchar_t * Key, const wchar_t * NewValue);

參數

FileHandle由 DAOpenFile、DAOpenFileReadOnly 或 DAOpenFromStream 函式傳回的控制代碼
Key標準資訊請用 "Author"、"Title"、"Subject"、"Keywords"、"Creator"、"Producer"、"CreationDate" 或 "ModDate";自訂資訊可用任何其他字串。
NewValue指定鍵的新值。

傳回值

0指定的 FileHandle 無效 資訊鍵設定或更新成功
1