📄 trktool.h
字号:
TRK_CSTR userName); // Input
TRKAPI TrkGetAssociationRevisionFound(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_UINT bufferSize, // Input
TRK_STR revisionFound); // Output
TRKAPI TrkSetAssociationRevisionFound(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_CSTR revisionFound); // Input
TRKAPI TrkGetAssociationRevisionFixed(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_UINT bufferSize, // Input
TRK_STR revisionFixed); // Output
TRKAPI TrkSetAssociationRevisionFixed(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_CSTR revisionFixed); // Input
TRKAPI TrkGetAssociationTimeFound(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_TIME FAR* pTimeFound); // Output
TRKAPI TrkSetAssociationTimeFound(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_TIME timeFound); // Input
TRKAPI TrkGetAssociationTimeFixed(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_TIME FAR* pTimeFixed); // Output
TRKAPI TrkSetAssociationTimeFixed(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_TIME timeFixed); // Input
TRKAPI TrkGetAssociationTextLength(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_UINT FAR* pDataBufferSize); // Output
TRKAPI TrkGetAssociationText(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_UINT maxBufferSize, // Input
TRK_STR description, // Output
TRK_UINT FAR* pDataRemaining); // Output
TRKAPI TrkSetAssociationText(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_UINT currentBufferSize, // Input
TRK_CSTR description, // Input
TRK_UINT dataRemaining); // Input
// *********************************************************
// Provide a Transaction ID representing when a particular
// Association was added to the current record.
TRKAPI TrkGetAssociationTransactionID(
TRK_ASSOC_HANDLE trkAssociationHandle, // Input
TRK_TRANSACTION_ID FAR* pTransactionID); // Output
// *********************************************************
// *********************************************************
// Export / Import
// *********************************************************
// *********************************************************
// *********************************************************
// The Tracker Export Handle is used in place of Tracker
// Handles in those functions below which perform export
// operations.
//
// TrkExportHandleAlloc must be called first to create
// an Export Handle. TrkExportHandleFree releases all
// memory associated with that handle.
//
// If desired, multiple Export Handles may be used
// concurrently.
// *********************************************************
TRKAPI TrkExportHandleAlloc(
TRK_HANDLE trkHandle, // Input
TRK_EXPORT_HANDLE FAR* pTrkExportHandle); // Output
TRKAPI TrkExportHandleFree(
TRK_EXPORT_HANDLE FAR* pTrkExportHandle); // Input/Output
// *********************************************************
// Provide higher level functions which export records to a
// file using a fixed format.
//
// The TrkExportRecordsBegin function is called first to set
// the filename, export set, delimiter character, separator
// character, the type of quote embedding to use (either \" or
// ""), as well as the format for date and time fields. If the
// "trackerFormat" argument is set to TRK_EXPORT_TRACKER_FORMAT,
// then the remaining arguments should be set to zero and will
// be ignored. The "trackerFormat" argument must be set to
// TRK_EXPORT_TRACKER_FORMAT if the export file will be
// imported back into Tracker.
//
// The TrkExportOneRecord function exports one record. The
// TrkExportRecordsClose function must be called to complete
// the export operation.
// *********************************************************
typedef TRK_UINT TRK_EXPORT_FORMAT;
typedef TRK_UINT TRK_EMB_QUOTE;
typedef TRK_UINT TRK_DATE_FORMAT;
typedef TRK_UINT TRK_TIME_FORMAT;
enum _TrkExportFormat {
TRK_EXPORT_FORMAT_SIMPLE = 0,
TRK_EXPORT_FORMAT_TRACKER = 1,
TRK_EXPORT_FORMAT_PDIFF = 2,
TRK_EXPORT_FORMAT_XML = 3 };
enum _TrkEmbeddedQuote {
TRK_DOUBLE_QUOTE = 1,
TRK_BACKSLASH_QUOTE = 2 };
enum _TrkDateFormat {
TRK_CONTROL_PANEL_DATE = 1,
TRK_DBASE_FORMAT = 2 };
enum _TrkTimeFormat {
TRK_CONTROL_PANEL_TIME = 1,
TRK_24HOUR = 2,
TRK_24HOUR_LEADING_ZERO = 3 };
TRKAPI TrkExportRecordsBegin(
TRK_EXPORT_HANDLE trkExportHandle, // Input
TRK_RECORD_TYPE recordType, // Input
TRK_CSTR fileToWriteTo, // Input
TRK_BOOL trackerFormat, // Input
TRK_CHAR delimiterCharacter, // Input (optional)
TRK_CHAR separatorCharacter, // Input (optional)
TRK_EMB_QUOTE embeddedQuoteType, // Input (optional)
TRK_DATE_FORMAT dateFormat, // Input (optional)
TRK_TIME_FORMAT timeFormat); // Input (optional)
TRKAPI TrkExportOneRecord(
TRK_EXPORT_HANDLE trkExportHandle, // Input
TRK_RECORD_HANDLE trkRecordHandle); // Input
TRKAPI TrkExportRecordsClose(
TRK_EXPORT_HANDLE trkExportHandle); // Input
// *********************************************************
// The Tracker Import Handle is used in place of Tracker
// Handles in those functions below which perform import
// operations.
//
// TrkImportHandleAlloc must be called first to create an
// Import Handle. TrkImportHandleFree releases all memory
// associated with that handle.
//
// If desired, multiple Import Handles may be used
// concurrently.
// *********************************************************
TRKAPI TrkImportHandleAlloc(
TRK_HANDLE trkHandle, // Input
TRK_IMPORT_HANDLE FAR* pTrkImportHandle); // Output
TRKAPI TrkImportHandleFree(
TRK_IMPORT_HANDLE FAR* pTrkImportHandle); // Input/Output
// *********************************************************
// Provide higher level functions to import records from a
// file. Assumes the file was written using the same format as
// the "TrkExport" functions above and that "trackerFormat" was
// set to TRUE in the TrkExportRecordsBegin function.
//
// TrkImportInit must be called first. The filename containing
// the import data is specified in this function call. In
// addition, arguments are given to indicate which actions to
// take when a bad date, choice, user, or out of range number
// is encountered. If these functions are not called, the
// default behavior is to fail import. If the
// TRK_SET_TO_SPECIFIED date option is used, the "defaultDate"
// argument must be provided (in Control Panel format - default
// format is MM/DD/YY).
//
// TrkImportNewRecords performs the actual import. Failure to
// set "trackerFormat" to TRUE on export will result in a
// failure to import. The fields being imported will be
// automatically mapped by type and name. Fields that don't
// match any fields in the import project will be discarded.
// All notes will be imported regardless of note title.
// *********************************************************
typedef TRK_UINT TRK_DATE_OPTION;
typedef TRK_UINT TRK_CHOICE_OPTION;
typedef TRK_UINT TRK_USER_OPTION;
typedef TRK_UINT TRK_NUMBER_OPTION;
enum _TrkDateOption {
TRK_FAIL_DATE = 0,
TRK_SET_CURRENT = 1,
TRK_SET_TO_SPECIFIED = 2 };
enum _TrkChoiceOption {
TRK_FAIL_CHOICE = 0,
TRK_DEFAULT_CHOICE = 1,
TRK_NEW_CHOICE = 2 };
enum _TrkUserOption {
TRK_FAIL_USER = 0,
TRK_ADD_USER = 1,
TRK_ADD_USER_WITH_GROUP = 2,
TRK_DEFAULT_USER = 3 };
enum _TrkNumberOption {
TRK_FAIL_NUMBER = 0,
TRK_DEFAULT_NUMBER = 1 };
TRKAPI TrkImportInit(
TRK_IMPORT_HANDLE trkImportHandle, // Input
TRK_CSTR fileToReadFrom, // Input
TRK_BOOL trackerFormat, // Input
TRK_RECORD_TYPE recordType, // Input (optional)
TRK_CHAR delimiterCharacter, // Input (optional)
TRK_CHAR separatorCharacter, // Input (optional)
TRK_DATE_FORMAT dateFormat, // Input (optional)
TRK_TIME_FORMAT timeFormat); // Input (optional)
TRKAPI TrkImportSetOptions(
TRK_IMPORT_HANDLE trkImportHandle, // Input
TRK_CHOICE_OPTION choiceOption, // Input (optional)
TRK_USER_OPTION userOption, // Input (optional)
TRK_NUMBER_OPTION numberOption, // Input (optional)
TRK_DATE_OPTION dateOption, // Input (optional)
TRK_CSTR defaultDate); // Input (optional)
TRKAPI TrkImportNewRecords(
TRK_IMPORT_HANDLE trkImportHandle, // Input
TRK_CSTR errorLogFile); // Input (optional)
// *********************************************************
// *********************************************************
// Callbacks
// *********************************************************
// *********************************************************
// Use of callbacks is optional.
// Define the list of messages for which callbacks will be issued.
enum _TrkCallbackMessage {
TRK_MSG_API_TRACE = 1,
TRK_MSG_API_EXIT = 2,
TRK_MSG_ODBC_ERROR = 3,
TRK_MSG_INVALID_FIELD_VALUE = 4,
TRK_MSG_DATA_TRUNCATED = 5,
TRK_MSG_FORCE_LOGOUT = 6,
TRK_MSG_IMPORT_ERROR = 7,
TRK_MSG_INTRAY_PROGRESS = 8,
TRK_MSG_QUERY_PROGRESS = 9,
TRK_MSG_IMPORT_PROGRESS = 10,
TRK_LAST_CALLBACK_MSG }; // (not a message; marks end of list)
enum _TrkCallbackReturnCode {
TRK_MSG_NOT_HANDLED = 0,
TRK_MSG_HANDLED = 1 };
// Define the prototype for Callback functions.
//
// Arguments:
// The message argument 'msg' will be one value from the
// list of messages defined above.
// The values for 'param1', 'param2' and 'strParam' will vary
// depending on the message.
// The 'userData' value is the same value that was specified
// by the client when the callback was registered. See
// also 'TrkRegisterCallback'.
//
// The return value should be set within the client's callback
// handler code to be either:
// TRK_MSG_NOT_HANDLED to continue processing remaining
// callbacks (from the list of registered functions), or
// TRK_MSG_HANDLED to bypass further callback processing.
//
// Note the use of '_loadds' in the callback declaration. 16-bit
// clients must use this or its equivalent (such as listing the
// function as an EXPORT in the .DEF file) to ensure that the Data
// Segment is changed to the client app's value upon entry into
// the callback.
typedef TRKAPI LOADDS TRKCALLBACK(
TRK_UINT msg,
TRK_UINT param1,
TRK_UINT param2,
TRK_CSTR strParam,
TRK_UINT userData);
typedef TRKCALLBACK FAR *PTRKCALLBACK;
// *********************************************************
// Callback registration.
//
// The linkOrder parameter should be set to either TRK_LIST_ADD_HEAD
// or TRK_LIST_ADD_TAIL to indicate whether the callback should be
// called first or last.
//
// The userData value will be supplied back to the client as one
// of the arguments in the callback.
//
// This function may be called before login.
enum _TrkLinkOrder {
TRK_LIST_ADD_HEAD = 0,
TRK_LIST_ADD_TAIL = 1 };
TRKAPI TrkRegisterCallback(
TRK_HANDLE trkHandle, // Input
PTRKCALLBACK pCallbackFunction, // Input
TRK_LIST_LINK_ORDER linkOrder, // Input
TRK_UINT userData); // Input (optional)
// *********************************************************
// Remove a function from the list of callbacks.
//
// This function may be called before login.
TRKAPI TrkUnregisterCallback(
TRK_HANDLE trkHandle, // Input
PTRKCALLBACK pCallbackFunction); // Input
// *********************************************************
#ifndef TRK_DEBUG
#ifdef __cplusplus
}
#endif
#endif
#endif // _TRKTOOL_H_
// *******************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -