TUTIL32.PAS
上传用户:oceanht
上传日期:2014-03-26
资源大小:1376k
文件大小:3k
源码类别:

其他数据库

开发平台:

Delphi

  1. unit TUtil32;
  2. interface
  3. uses Bde, DbiTypes;
  4. { TUtility (TUVerifyTable) Session Options }
  5. const
  6.   TU_Append_Errors = 1;
  7.   TU_No_Secondary  = 2;
  8.   TU_No_Warnings   = 4;
  9.   TU_Header_Only   = 8;
  10.   TU_Dialog_Hide   = 16;
  11.   TU_No_Lock       = 32;
  12. { TUtility type definitions }
  13. type
  14.   hTUses  = Word;
  15.   phTUses = ^hTUses;
  16.   { Verify Callback processes }
  17.   TUVerifyProcess = (TUVerifyHeader, TUVerifyIndex, TUVerifyData, TUVerifySXHeader,
  18.                      TUVerifySXIndex, TUVerifySXData, TUVerifySXIntegrity,
  19.                      TUVerifyTableName, TURebuild);
  20.   { Call back info for Verify Callback function }
  21.   TUVerifyCallBack = record
  22.     PercentDone: word;
  23.     TableName: DBIPath;
  24.     Process: TUVerifyProcess;
  25.     CurrentIndex: word;
  26.     TotalIndex: word;
  27.   end;
  28. { TUtility functions }
  29. function TUInit(var hTUSession: hTUses): DBIResult;  stdcall;
  30. function TUVerifyTable(hTUSession: hTUses;
  31.                        pszTableName,
  32.                        pszDriverType,
  33.                        pszErrTableName,
  34.                        pszPassword: PChar;
  35.                        iOptions: integer;
  36.                        var piErrorLevel: Integer): DBIResult; stdcall;
  37. function TURebuildTable(hTUSession: hTUses;
  38.                         pszTableName,
  39.                         pszDriverType,
  40.                         pszBackupTableName,
  41.                         pszKeyviolName,
  42.                         pszProblemTableName: PChar;
  43.                         pCrDesc: pCRTblDesc): DBIResult; stdcall;
  44. function TUGetCRTblDescCount(hTUSession: hTUses;
  45.                              pszTableName: PChar;
  46.                              var iFldCount,
  47.                              iIdxCount,
  48.                              iSecRecCount,
  49.                              iValChkCount,
  50.                              iRintCount,
  51.                              iOptParams,
  52.                              iOptDataLen: word): DBIResult; stdcall;
  53. function TUFillCRTblDesc(hTUSession: hTUses;
  54.                          pCrDesc: pCRTblDesc;
  55.                          pszTableName,
  56.                          pszPassword: PChar): DBIResult; stdcall;
  57. function TUFillCURProps(hTUSession: hTUses;
  58.                         pszTableName: PChar;
  59.                         var tblProps: CURProps): DBIResult; stdcall;
  60. function TUGetExtTblProps(hTUSession: hTUses;
  61.                           pszTableName: PChar;
  62.                           var pTS: TimeStamp;
  63.                           var pbReadOnly: Boolean): DBIResult; stdcall;
  64. function TUExit(hTUSession: hTUses): DBIResult; stdcall;
  65. function TUGetErrorString(iErrorcode: DBIResult;
  66.                           pszError: PChar): DBIResult; stdcall;
  67. implementation
  68. const
  69.   TU32 = 'TUTIL32.DLL';
  70. function TUInit;              external TU32 name 'TUInit';
  71. function TUVerifyTable;       external TU32 name 'TUVerifyTable';
  72. function TURebuildTable;      external TU32 name 'TURebuildTable';
  73. function TUGetCRTblDescCount; external TU32 name 'TUGetCRTblDescCount';
  74. function TUFillCRTblDesc;     external TU32 name 'TUFillCRTblDesc';
  75. function TUFillCURProps;      external TU32 name 'TUFillCURProps';
  76. function TUGetExtTblProps;    external TU32 name 'TUGetExtTblProps';
  77. function TUExit;              external TU32 name 'TUExit';
  78. function TUGetErrorString;    external TU32 name 'TUGetErrorString';
  79. end.