📄 pfgcondmgre.pas
字号:
unit pfgCondMgre;
{**************************************************************************}
{* pfgCondMgre Unit *}
{* *}
{* Header file conversion of CondMgre.h *}
{* *}
{* Version History: *}
{* 1/11/2000 - Initial manual header file convesrion *}
{* 9/7/2003 - Converted methods to use dynamically loaded DLL, using *}
{* a set of HeadConv converted method declarations *}
{**************************************************************************}
interface
uses SysUtils, Windows, pfgWTypes;
{
/*****************************************************************************
*
* Copyright (c) 1998-1999 Palm Computing, Inc. or its subsidiaries.
* All rights reserved.
*
****************************************************************************/
/*****************************************************************
*
* Conduit Manager API
*
****************************************************************/
}
const
ERR_CONDUIT_MGR = -1000;
ERR_INDEX_OUT_OF_RANGE = (ERR_CONDUIT_MGR - 1);
ERR_UNABLE_TO_DELETE = (ERR_CONDUIT_MGR - 2);
ERR_NO_CONDUIT = (ERR_CONDUIT_MGR - 3);
ERR_NO_MEMORY = (ERR_CONDUIT_MGR - 4);
ERR_CREATORID_ALREADY_IN_USE = (ERR_CONDUIT_MGR - 5);
ERR_REGISTRY_ACCESS = (ERR_CONDUIT_MGR - 6);
ERR_UNABLE_TO_CREATE_CONDUIT = (ERR_CONDUIT_MGR - 7);
ERR_UNABLE_TO_SET_CONDUIT_VALUE = (ERR_CONDUIT_MGR - 8);
ERR_INVALID_HANDLE = (ERR_CONDUIT_MGR - 9);
ERR_BUFFER_TOO_SMALL = (ERR_CONDUIT_MGR - 10);
ERR_VALUE_NOT_FOUND = (ERR_CONDUIT_MGR - 11);
ERR_INVALID_CREATOR_ID = (ERR_CONDUIT_MGR - 12);
ERR_INVALID_POINTER = (ERR_CONDUIT_MGR - 13);
ERR_UNABLE_TO_INSTALL_OLD = (ERR_CONDUIT_MGR - 14);
ERR_INVALID_CONDUIT_TYPE = (ERR_CONDUIT_MGR - 15);
ERR_INVALID_COM_PORT_TYPE = (ERR_CONDUIT_MGR - 16);
ERR_NO_LONGER_SUPPORTED = (ERR_CONDUIT_MGR - 17);
INVALID_CREATORID = 0;
INVALID_PRIORITY = 2;
INVALID_INTEGRATE = 0;
CONDUIT_COMPONENT = 0;
CONDUIT_APPLICATION = 1;
CONDUIT_CONDUITS = 10;
BACKUP_CONDUIT = 0;
MAX_SPECIAL = BACKUP_CONDUIT;
DIRECT_COM_PORT = 0;
MODEM_COM_PORT = 1;
MAX_COM_PORT = MODEM_COM_PORT;
CM_CREATOR_ID_SIZE = 8; // Rounded up from 4+1
type
CM_CREATORLIST_ITEM_TYPE = packed record
// only need 4 + 1 string terminator, by lets make it even
szCreatorID: Array [0..CM_CREATOR_ID_SIZE-1] of Char;
iReserved: Integer;
end;
CM_CREATORLIST_TYPE = ^CM_CREATORLIST_ITEM_TYPE;
CmConduitType =packed record
iStructureVersion: Integer;
iStructureSize: Integer;
iType: Integer; // Types CONDUIT_X
// only need 4 + 1 string terminator, by lets make it even.
szCreatorID: Array [0..CM_CREATOR_ID_SIZE-1] of Char;
dwPriority: DWORD;
iConduitNameOffset: Integer;
iDirectoryOffset: Integer;
iFileOffset: Integer;
iRemoteDBOffset: Integer;
iUsernameOffset: Integer;
iTitleOffset: Integer;
iInfoOffset: Integer;
end;
FileInstallType = record
szDir: Array[0..64-1] of TCHAR;
szExt: Array[0..256-1] of TCHAR;
dwMask: LongInt;
szModule: Array[0..256-1] of TCHAR;
dwCreatorID: LongInt;
szName: Array[0..256-1] of TCHAR;
end {FileInstallType};
const
FILEINSTALLTYPE_SIZE = sizeof(FileInstallType);
const
CM_MIN_CONDUITTYPE_SIZE = sizeof(CmConduitType);
CM_CONDUIT_BUFFER_OFFSET = sizeof(CmConduitType);
CONDUIT_VERSION = 100;
// API functions
CM_INITIAL_LIB_VERSION = $0001;
CM_UPDATE_1 = $0002;
var
CmGetLibVersion: function: Word; stdcall;
{/// Utilities for manipulating Creator ID's }
CmConvertCreatorIDToString: function(dwID: LongInt;
pString: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmConvertStringToCreatorID: function(const pString: PTCHAR;
var pdwID: LongInt): Integer; stdcall;
{/// }
{/// Functions for reading current conduit configuration }
{/// }
CmGetConduitCount: function: Integer; stdcall;
CmGetCreatorIDList: function(pCreatorList: CM_CREATORLIST_TYPE;
var piSize: Integer): Integer; stdcall;
CmGetConduitCreatorID: function(iIndex: Integer;
pCreatorID: PChar;
var piSize: Integer): Integer; stdcall;
CmGetConduitByCreator: function(const pCreatorID: PChar;
var hStruct: Handle): Integer; stdcall;
{/// }
{/// Functions for installing a new conduit }
{/// }
CmInstallConduit: function(hStruct: THandle): Integer; stdcall;
{/// Only defines Creator ID for a new conduit; other values must }
{/// be set separately. }
CmInstallCreator: function(const pCreator: PChar;
iType: Integer): Integer; stdcall;
{/// }
{/// Functions for removing a conduit }
{/// }
CmRemoveConduitByCreatorID: function(const pCreatorID: PChar): Integer; stdcall;
{/// }
{/// Creator ID based functions for accessing individual data items. }
{/// }
CmSetCreatorPriority: function(const pCreatorID: PChar;
dwPriority: LongInt): Integer; stdcall;
CmGetCreatorPriority: function(const pCreatorID: PChar;
var pdwPriority: LongInt): Integer; stdcall;
CmSetCreatorName: function(const pCreatorID: PChar;
const pConduitName: PTCHAR): Integer; stdcall;
CmGetCreatorName: function(const pCreatorID: PChar;
pConduitName: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmSetCreatorDirectory: function(const pCreatorID: PChar;
const pDirectory: PTCHAR): Integer; stdcall;
CmGetCreatorDirectory: function(const pCreatorID: PChar;
pDirectory: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmSetCreatorRemote: function(const pCreatorID: PChar;
const pRemoteDB: PTCHAR): Integer; stdcall;
CmGetCreatorRemote: function(const pCreatorID: PChar;
pRemoteDB: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmSetCreatorUser: function(const pCreatorID: PChar;
const pUsername: PTCHAR): Integer; stdcall;
CmGetCreatorUser: function(const pCreatorID: PChar;
pUsername: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmSetCreatorTitle: function(const pCreatorID: PChar;
const pTitle: PTCHAR): Integer; stdcall;
CmGetCreatorTitle: function(const pCreatorID: PChar;
pTitle: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmSetCreatorInfo: function(const pCreatorID: PChar;
const pInfo: PTCHAR): Integer; stdcall;
CmGetCreatorInfo: function(const pCreatorID: PChar;
pInfo: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmSetCreatorFile: function(const pCreatorID: PChar;
const pFile: PTCHAR): Integer; stdcall;
CmGetCreatorFile: function(const pCreatorID: PChar;
pFile: PTCHAR;
var piSize: Integer): Integer; stdcall;
{/// Conduit Type - TO BE OBSOLETED }
CmGetCreatorType: function(const pCreator: PChar): Integer; stdcall;
{/// }
{/// Functions for integrating applications with PalmPilot Desktop. }
{/// }
{/// Not guaranteed to be supported in future revisions. }
CmSetCreatorIntegrate: function(const pCreatorID: PChar;
dwIntegrate: LongInt): Integer; stdcall;
CmGetCreatorIntegrate: function(const pCreatorID: PChar;
var pdwIntegrate: LongInt): Integer; stdcall;
CmSetCreatorModule: function(const pCreatorID: PChar;
const pModule: PTCHAR): Integer; stdcall;
CmGetCreatorModule: function(const pCreatorID: PChar;
pModule: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmSetCreatorArgument: function(const pCreatorID: PChar;
const pArgument: PTCHAR): Integer; stdcall;
CmGetCreatorArgument: function(const pCreatorID: PChar;
pArgument: PTCHAR;
var piSize: Integer): Integer; stdcall;
{/// }
{/// Functions for accessing other HotSync configuration info. }
{/// }
{/// Port access }
CmSetComPort: function(iType: Integer;
const pPort: PTCHAR): Integer; stdcall;
CmGetComPort: function(iType: Integer;
pPort: PTCHAR;
var piSize: Integer): Integer; stdcall;
{/// Backup conduit }
CmSetBackupConduit: function(const pConduit: PTCHAR): Integer; stdcall;
CmGetBackupConduit: function(pConduit: PTCHAR;
var piSize: Integer): Integer; stdcall;
{/// Notifiers }
CmSetNotifierDll: function(iIndex: Integer;
const pNotifier: PTCHAR): Integer; stdcall;
CmGetNotifierDll: function(iIndex: Integer;
pNotifier: PTCHAR;
var piSize: Integer): Integer; stdcall;
{/// PC ident }
CmSetPCIdentifier: function(dwPCID: LongInt): Integer; stdcall;
CmGetPCIdentifier: function(var pdwPCID: LongInt): Integer; stdcall;
{/// Core path }
CmGetCorePath: function(pPath: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmSetCorePath: function(const pPath: PTCHAR): Integer; stdcall;
{/// HotSync Path }
CmGetHotSyncExecPath: function(pPath: PTCHAR;
var piSize: Integer): Integer; stdcall;
CmSetHotSyncExecPath: function(const pPath: PTCHAR): Integer; stdcall;
CmSetCreatorValueDword: function(const pCreatorID: PChar;
pValue: PTCHAR;
dwValue: LongInt): Integer; stdcall;
CmGetCreatorValueDword: function(const pCreatorID: PChar;
pValue: PTCHAR;
var dwValue: LongInt;
dwDefault: LongInt): Integer; stdcall;
CmSetCreatorValueString: function(const pCreatorID: PChar;
pValue: PTCHAR;
pString: PTCHAR): Integer; stdcall;
CmGetCreatorValueString: function(const pCreatorID: PChar;
pValue: PTCHAR;
pString: PTCHAR;
var piSize: Integer;
pDefault: PTCHAR): Integer; stdcall;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -