⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pfgsyncmgr.pas

📁 delphi编写与Palm数据交换管道连接程序。
💻 PAS
📖 第 1 页 / 共 4 页
字号:

  CUserIDInfo = packed record
    m_pName: Array [0..SYNC_REMOTE_USERNAME_BUF_SIZE-1] of Char;
    m_NameLength: Integer;
    m_Password: Array [0..SYNC_REMOTE_PASSWORD_BUF_SIZE-1] of Char;
    m_PasswdLength: Integer;
    m_LastSyncDate: Long;      // Date/Time of last synchronization
    m_LastSyncPC: DWORD;
    m_Id: DWORD;
    m_ViewerId: DWORD;
    m_dwReserved: DWORD;       // Reserved - set to NULL
  end;


  //
  //  A structure element for the SyncReadSingleCardInfo() function call.
  //

  CCardInfo = packed record
    m_CardNo: Byte;
    m_CardVersion: Word;
    m_CreateDate: Long;
    m_RomSize: DWORD;
    m_RamSize: DWORD;
    m_FreeRam: DWORD;
    m_CardNameLen: Byte;
    m_ManufNameLen: Byte;
    m_CardName: Array [0..SYNC_REMOTE_CARDNAME_BUF_SIZE-1] of Char;
    m_ManufName: Array [0..SYNC_REMOTE_MANUFNAME_BUF_SIZE-1] of Char;

    // added in v1.1 and v2.0
    m_romDbCount: Word;		// number of ROM-based databases
    m_ramDbCount: Word;		// number of RAM-based databases

    m_dwReserved: DWORD; 	// Reserved - set to NULL
  end;


  //
  // Used to obtain remote system information.
  //

  CSystemInfo = packed record
    m_RomSoftVersion: DWORD;	// Upon return is filled in
    m_LocalId: DWORD;	     	// Upon return is filled in
    m_ProdIdLength: Byte;    	// Upon return is filled in (actual len)
    m_AllocedLen: Byte;		// Supplied by caller: size of buffer for ProductIdText
    m_ProductIdText: PByte;	// Allocated by caller: bufer for ProductIdText
    m_dwReserved: DWORD;     	// Reserved - set to NULL
  end;


  //
  //  Used by the 'SyncCallApplication()' API
  //

  CCallAppParams = packed record
    m_CreatorID: DWORD;
    m_ActionCode: Word;
    m_ResultCode: Word;
    m_ParamSize: Word;
    m_pParams: PByte;
  end;


  //
  //  Used by the 'SyncCallDeviceApplication()' API
  //

  CCallDeviceAppParams = packed record
    m_dbName : Array [0..SYNC_DB_NAMELEN-1] of Char;
    m_dwCreatorID: DWORD;
    m_dwTypeID: DWORD;
    m_wAttributes: Word;
    m_wActionCode: Word;
    m_dwParamSize: DWORD;
    m_pParam: Pointer;
    m_dwResultBufSize: DWORD;
    m_pResultBuf: Pointer;
    m_dwResultCode: DWORD;
    m_dwActResultSize: DWORD;
    m_dwReserved: DWORD;
  end;

  //
  //	Used by the 'SyncCallRemoteModule()' API for Pilot v2.0 and greater
  //	vmk	12/5/96
  //

  CCallModuleParams = packed record
    // PASSED VALUES:
    m_dwCreatorID: DWORD;	 	// target application creator ID
    m_dwTypeID: DWORD;		 	// target application type ID
    m_wActionCode: Word;	 	// app-specific action code
    m_dwParamSize: DWORD;	 	// parameter block size
    m_pParam: Pointer;		 	// pointer to parameter block
    m_dwResultBufSize: DWORD;		// result buffer size
    m_pResultBuf: Pointer;	 	// pointer to result buffer

    // RETURNED VALUES
    m_dwResultCode: DWORD;	    	// result code returned by remote module

    m_dwActResultSize: DWORD;		// the actual result data size returned by
												// remote module; this value may be greater
					// than m_dwResultBufSize upon return -- in
				        // which case the caller's buffer wasn't
					// big enough to contain the entire result
					// data block and only m_dwResultBufSize bytes
					// were copied to the result buffer.
    // RESERVED:
    m_dwReserved: DWORD;		// RESERVED -- CALLER/CALLEE: SET TO NULL!!!
  end;


  //
  //  Used by ReadPositionXMap
  //

  CPositionInfo = packed record
    m_FileHandle: Byte;                 // Open database handle
    m_FirstPos: Word;                   // offset of first position to read
    m_MaxEntries: Word;                 // total number of record Id's to read
    m_NumReadIn: Word;                  // updated with number read in
    m_TotalBytes: Word;                 // total length of 'pBytes'
    m_pBytes: PByte;                    // buffer to contain all record Id's
  end;


///////////////////////////////////////////////////////////////////////////////
//
// Parameter to SyncFindDbByName, SyncFindDbByTypeCreator, and SyncReadOpenDbInfo
//
///////////////////////////////////////////////////////////////////////////////

type
  // Structure for returning database information
  SyncDatabaseInfoType = packed record

    // Basic database information:
    baseInfo: CDbList;

    // Extended database information:

    // Returned only if SYNC_DB_INFO_OPT_GET_SIZE is set:
    dwNumRecords: DWORD; 	// number of records/resources in the database
    dwTotalBytes: DWORD;	// total bytes of storage used by database (including overhead)
    dwDataBytes: DWORD;		// total bytes of storage used for data

    // Returned only for SyncReadOpenDbInfo and only if SYNC_DB_INFO_OPT_GET_SIZE
    // is set:
    dwAppBlkSize: DWORD; 	// app info block size in number of bytes
    dwSortBlkSize: DWORD;	// sort info block size in number of bytes

    // Returned only for SyncReadOpenDbInfo and only if SYNC_DB_INFO_OPT_GET_MAX_REC_SIZE
    // is set:
    dwMaxRecSize: DWORD; 	// size of the largest record or resource in the
	                        // database

    dwReserved: DWORD;		// RESERVED -- SET TO NULL!!!


    // FIELDS FOR INTERNAL USE:
    dwLocalID: DWORD;		// LocalID of the database (internal use)
    dwOpenRef: DWORD;           // db open ref of the database if it is currently opened
  end;

  // SyncFindDbByName parameter
  SyncFindDbByNameParams = packed record
    bOptFlags: Byte;		// bitfield of SYNC_DB_INFO_OPT_... flags
    dwCardNum: DWORD;		// memory card number
    pcDatabaseName: PChar;	// pointer to null-terminated database name
  end;


  // SyncFindDbByTypeCreator parameter
  SyncFindDbByTypeCreatorParams = packed record
    bOptFlags: Byte;		// bitfield of SYNC_DB_INFO_OPT_... flags
    bSrchFlags: Byte;		// bitfield of SYNC_DB_SRCH_OPT_... flags
    dwType: DWORD;		// database type (zero = wildcard)
    dwCreator: DWORD;		// database creator (zero = wildcard)
  end;


  // SyncReadOpenDbInfo parameter
  SyncReadOpenDbInfoParams = packed record
    bOptFlags: Byte;		// bitfield of SYNC_DB_INFO_OPT_... flags
    bDbHandle: Byte;		// open database handle (from SyncOpenDB or SyncCreateDB)
  end;

{
///////////////////////////////////////////////////////////////////////////////////////////////
//
// Sync Manager API version numbers (v2.0 and later)
//
///////////////////////////////////////////////////////////////////////////////////////////////

/**********************************************************************************************
 * (v2.0 and later)
 *
 * The SYNC MANAGER API VERSION scheme enables the conduits to identify the level
 * of service provided by the Sync Manager DLL.
 *
 * MAJOR AND MINOR VERSION NUMBERS:
 *
 * Beginning with the current version (v2.0), the Sync Manager API will strive to
 * maintain backward compatibility within a given MAJOR version number group.  As new
 * exported functions are added to the API or critical bugs are fixed, the MINOR version number of
 * the API will be incremented and the documentation of the new functions will identify the
 * API version number where they were first available.  The conduits can (and should) check
 * the Sync Manager API version number using the function SyncGetAPIVersion().
 * So, if a conduit requires a particular Sync Manager function
 * which was added in API version number 2.1, for example, the conduit should call SyncGetAPIVersion
 * to make sure that the MAJOR number is 2 and the MINOR number is 1 or greater.
 *
 * SYNC MANAGER DLL NAMING CONVENTION:
 *
 * The Sync Manager DLL will be named to reflect the MAJOR API version number.  For example, the release
 * version of the Sync Manager DLL which implements a 2.x API will be named Sync20.dll.  The debug
 * version of same will be named Sync20d.dll.  This convention permits a conduit which depends on given
 * MAJOR and MINOR Sync Manager API version numbers to link with a Sync Manager DLL which implements an
 * API with the same MAJOR version number but a higher MINOR version number.
 *
 * vmk	10/21/96
 *
 **********************************************************************************************/
}

// NEW

// 1.0 CALLS:
var
  SyncAddLogEntry: function (const pText: PChar): Integer; cdecl; 
  SyncRegisterConduit: function (var rHandle: CONDHANDLE): Integer; cdecl; 
  SyncUnRegisterConduit: function (handle: CONDHANDLE): Integer; cdecl; 
  SyncReadUserID: function (const rInfo: CUserIDInfo): Integer; cdecl; 
  SyncOpenDB: function (const pName: PChar; nCardNum: Integer; var rHandle: Byte;
    openMode: Byte = (eDbWrite or eDbRead or eDbExclusive)): Integer; cdecl; 

  SyncDeleteDB: function (const pName: PChar; nCardNum: Integer): Integer; cdecl;
    
  SyncCreateDB: function (const rDbStats: CDbCreateDB): Integer; cdecl; 
  SyncCloseDB: function (fHandle: Byte): Integer; cdecl; 
  SyncGetDBRecordCount: function (fHandle: Byte; var rNumRecs: Word): Integer; cdecl; 
  SyncPurgeDeletedRecs: function (fHandle: Byte): Integer; cdecl; 
  SyncPurgeAllRecs: function (fHandle: Byte): Integer; cdecl; 
  SyncResetSyncFlags: function (fHandle: Byte): Integer; cdecl; 
  SyncReadDBList: function (cardNo: Byte; startIx: Word; bRam: BOOL; pList:
    PCDbList; var rCnt: Integer): Integer; cdecl; 
  SyncWriteRec: function (const rInfo: CRawRecordInfo): Integer; cdecl; 
  SyncDeleteRec: function (const rInfo: CRawRecordInfo): Integer; cdecl; 
  SyncDeleteResourceRec: function (const rInfo: CRawRecordInfo): Integer; cdecl; 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -