📄 pfgsyncmgr.pas
字号:
SYNCERR_FILE_NOT_FOUND = SYNCERR_NOT_FOUND; // For backward compatibility
SYNCERR_FILE_NOT_OPEN = (SYNC_ERR_CLASS + $04); // Attempt to open a database failed
SYNCERR_FILE_OPEN = (SYNC_ERR_CLASS + $05); // NOT USED
SYNCERR_RECORD_BUSY = (SYNC_ERR_CLASS + $06); // The requested record is in use by someone
// else and will remain so indefinitely
SYNCERR_RECORD_DELETED = (SYNC_ERR_CLASS + $07); // The requested record has either been deleted
// or archived
SYNCERR_READ_ONLY = (SYNC_ERR_CLASS + $09); // Caller does not have write access or database is in ROM
SYNCERR_ROM_BASED = SYNCERR_READ_ONLY; // Defined for backward compatility
SYNCERR_COMM_NOT_INIT = (SYNC_ERR_CLASS + $0A); // Communications have not been intialized (this
// is an internal error code);
SYNCERR_FILE_ALREADY_EXIST = (SYNC_ERR_CLASS + $0B); // Could not create database because another
// one with the same name already exists on remote
SYNCERR_FILE_ALREADY_OPEN = (SYNC_ERR_CLASS + $0C); // The requested database is presently open by
// someone else
SYNCERR_NO_FILES_OPEN = (SYNC_ERR_CLASS + $0D); // An operation was requested on a database when
// no databases were open
SYNCERR_BAD_OPERATION = (SYNC_ERR_CLASS + $0E); // The requested operation is not supported on
// the given database type(record or resource);.
SYNCERR_REMOTE_BAD_ARG = (SYNC_ERR_CLASS + $0F); // Invalid argument passed to remote
SYNCERR_BAD_ARG_WRAPPER = (SYNC_ERR_CLASS + $10); // Internal Desktop Link error -- indicates
// protocol implementation error
SYNCERR_ARG_MISSING = (SYNC_ERR_CLASS + $11); // Internal Desktop Link error -- indicates
// protocol implementation error
SYNCERR_LOCAL_BUFF_TOO_SMALL = (SYNC_ERR_CLASS + $12); // The passed buffer is too small for the
// reply data
SYNCERR_REMOTE_MEM = (SYNC_ERR_CLASS + $13); // Insufficient memory on remote to receive
// or complete the request
SYNCERR_REMOTE_NO_SPACE = (SYNC_ERR_CLASS + $14); // Insufficient memory in remote data store
// to complete the request (write record,
// resource, etc.);
SYNCERR_REMOTE_SYS = (SYNC_ERR_CLASS + $15); // Generic remote system error (returned when
// exact cause is unknown);
// NEW v2.0 -- moved from fatal errors vmk 10/15/96
SYNCERR_LOCAL_MEM = (SYNC_ERR_CLASS + $16); // Local (PC) memory allocation error
// NEW v2.0
// NEW v2.1
SYNCERR_BAD_ARG = (SYNC_ERR_CLASS + $17); // Invalid parameter to local function, or
// parameter is too big
SYNCERR_LIMIT_EXCEEDED = (SYNC_ERR_CLASS + $18); // Data limit exceeded on remote (for example,
// when the hotsync error log size limit has
// has been exceeded on remote)
SYNCERR_UNKNOWN_REQUEST = (SYNC_ERR_CLASS + $19); // This request (command) is not supported
// by remote
// Fatal Errors
SYNCERR_TOO_MANY_OPEN_FILES = (SYNC_FATAL_ERR + $403); // Request failed because there are too many
// open databases (for efficiency, the current
// Desktop Link implementation supports only
// one open database at a time)
SYNCERR_TOO_MANY_FILES = SYNCERR_TOO_MANY_OPEN_FILES;// Defined for backward compatibility
SYNCERR_REMOTE_CANCEL_SYNC = (SYNC_FATAL_ERR + $405); // The request to cancel HotSync was initiated
// from the remote
SYNCERR_LOST_CONNECTION = (SYNC_FATAL_ERR + TRANS_ERR_CLASS + $410);
// Connection is lost. We add TRANS_ERR_CLASS
// because existing software checks that
// bit to detect connection loss.
// NEW v2.0
SYNCERR_LOCAL_CANCEL_SYNC = (SYNC_FATAL_ERR + $411); // The request to cancel HotSync was initiated
// from the PC
//
// Rom Version Macro functions
//
// $MMmfsbbb, where MM is major version, m is minor version
// f is bug fix, s is stage: 3-release,2-beta,1-alpha,0-development,
// bbb is build number for non-releases
// V1.12b3 would be: $01122003
// V2.00a2 would be: $02001002
// V1.01 would be: $01013000
function SYNCROMVMAJOR(l: LongWord): Byte;
function SYNCROMVMINOR(l: LongWord): Byte;
type
//
// A single element for a ReadDBList function call.
//
CDbList = packed record
m_CardNum: Integer;
m_DbFlags: Word; // contains Res/Record/Backup/ReadOnly (see enum eDbFlags)
m_DbType: DWORD;
m_Name: Array [0..SYNC_DB_NAMELEN-1] of Char;
m_Creator: DWORD;
m_Version: WORD;
m_ModNumber: DWORD;
m_Index: WORD; // not returned for SyncFindDbByName/TypeCreator
// and SyncReadOpenDbInfo
m_CreateDate: Long;
m_ModDate: Long;
m_BackupDate: Long;
m_miscFlags: LongWord; // miscellaneous db list flags (see eMiscDbListFlags)
m_RecCount: Long; // Unused - Not filled in by SyncManager calls
m_dwReserved: Long; // Unused - set to null
end;
CDbListPtr = ^CDbList;
PCDbList = CDbListPtr;
PPCDbList = ^PCDbList;
CSyncProperties = packed record
m_SyncType: eSyncTypes; // Fast/Slow
m_PathName: Array [0..BIG_PATH-1] of Char; // Path to prepend for disk file names
m_LocalName: Array [0..BIG_PATH-1] of Char; // Actual local disk file names
m_UserName: Array [0..BIG_PATH-1] of Char;
m_RemoteName: Array [0..SYNC_DB_NAMELEN-1] of PChar; // Names of remote database file names
m_RemoteDbList: PPCDbList; // CDbLists of remote databases
m_nRemoteCount: Integer; // number of remote database files
m_Creator: DWORD; // needed to create remote Db's
m_CardNo: WORD; // needed to create remote Db's
m_DbType: DWORD; // needed to create remote Db's
m_AppInfoSize: DWORD; // convenience
m_SortInfoSize: DWORD; // convenience
m_FirstDevice: eFirstSync; // First time sync for 1 device
m_Connection: eConnType; // Transfer medium
m_Registry: Array [0..BIG_PATH-1] of Char; // Full registry path for the conduit
m_hKey: HKEY; // primary registry key
m_dwReserved: DWORD; // Reserved - set to NULL
end;
CSyncPreference = packed record
m_PathName: Array [0..BIG_PATH-1] of Char; // Path to prepend for disk file names
m_Registry: Array [0..BIG_PATH-1] of Char; // Full registry path for the conduit
m_hKey: HKEY; // primary registry key
m_SyncPref: eSyncPref; // sync pref - perm/temp
m_SyncType: eSyncTypes; // sync type - fast/install
m_dwReserved: DWORD; // Reserved - set to NULL
end;
//
// Used by the calls to obtain the remote Categories
//
CDbGenInfo = packed record
m_FileName: Array [0..SYNC_DB_NAMELEN-1] of Char; // Name of remote database file
m_TotalBytes: Word; // When reading, the caller must fill this in
// with the size of the buffer pointed to by m_pBytes;
// When writing, the caller must set both this field
// and m_BytesRead to the size of the block being written.
m_BytesRead: Word; // *This field is poorly named*
// When reading, it will
// be filled in with the actual size of
// the app or sort block, which
// may be bigger than the amount of data which is
// copied to m_pBytes in the event the block is bigger
// than the buffer (in this case, only the first m_TotalBytes
// of record data will be copied to caller's buffer by
// Sync API v2.1 or later, and *NOTHING* will
// be copied by Sync API before v2.1).
// When writing, the caller must set this field (in addition to
// m_TotalBytes) to the size of the block being written.
m_pBytes: PByte; // pointer to caller's buffer
m_dwReserved: DWORD; // Reserved - set to NULL
end;
//
// Used by all the Record Oriented API's. Houses the DT_Link version
// of a database's record layout, specifically that of the remote device.
// Raw bytes will be formatted into this structure by the DTLinkConverter
// object which resides inside of each Conduit.DLL.
//
CRawRecordInfo = packed record
m_FileHandle: Byte; // Supplied by caller
m_RecId: DWORD; // Supplied by caller when reading or deleting records by record id; supplied by
// caller as the resource type when deleting a resource; filled in
// by HH when reading (unique record id for records and resource type for resources).
m_RecIndex: Word; // Supplied by caller when reading records or resources by index; supplied by caller
// as the resource id when deleting a resource; filled in by handheld as the resource
// id when reading a resource; filled in by HH when reading a record using Sync API v2.1
// or later.
m_Attribs: Byte; // Filled in by HH when reading, and by caller when writing
m_CatId: Smallint; // Filled in by HH when reading, and by caller when writing
m_ConduitId: Integer; // Ignore
m_RecSize: DWORD; // When reading, filled in by HH with the actual record/resource size,
// which might be bigger than buffer size m_TotalBytes (in this
// case, only the first m_TotalBytes of record data will be copied
// to caller's buffer by Sync API v2.1 or later, and NOTHING will
// be copied by Sync API before v2.1). When writing, filled in by
// caller with record data size (same as m_TotalBytes).
// ****NOTE that m_TotalBytes is defined as WORD, meaning that only
// records and resources under 64K may be read or written using this
// API (the actual maximum is ~63.8K bytes).
m_TotalBytes: Word; // Supplied by caller: buffer size for reading; record data size for writing
m_pBytes: PByte; // Buffer allocated by caller for reading or writing
m_dwReserved: DWORD; // Reserved - set to NULL
end;
//
// Used by all the Preferences Oriented API's. Houses the DT_Link version
// of a preference record layout, specifically that of the remote device.
// Raw bytes will be formatted into this structure by the DTLinkConverter
// object which resides inside of each Conduit.DLL.
//
CRawPreferenceInfo = packed record
m_version: Word; // Pref version - Supplied by caller in Write calls and by HH in Read calls
m_creator: DWORD; // Pref creator - Supplied by caller
m_prefId: Word; // Pref id - Supplied by caller
m_reqBytes: Word; // (read calls only)Number of preference bytes requested - Supplied by caller ($FFFF means get the entire preference)
m_retBytes: Word; // (read calls only)Number of preference bytes copied to caller's buffer
m_actSize: Word; // (read calls only)Actual pref size - Supplied by HH
m_backedUp: BOOL; // If true, the target pref database is the backed-up database - Supplied by caller
m_nBytes: Long; // Buffer size in read calls, data size in write calls - Supplied by caller
m_pBytes: PByte; // Data buffer - Allocated and supplied by caller
m_dwReserved: DWORD; // Reserved - set to NULL
end;
//
// Used in the CreateDB function call.
//
CDbCreateDB = packed record
m_FileHandle: BYTE; // Upon return gets filled in by SyncMgr.Dll
m_Creator: DWORD; // Supplied by caller, obtained from DbList
m_Flags: eDbFlags; // Supplied by caller, Res/Rec/RAM
m_CardNo: BYTE; // Supplied by caller, target card #
m_Name: Array [0..SYNC_DB_NAMELEN-1] of Char; // Supplied by caller, target DBase Name
m_Type: DWORD; // 'DATA' or 'APPL'...
m_Version: WORD;
m_dwReserved: DWORD; // Reserved - set to NULL
end;
//
//
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -