Пример вызова TUTILITY DLL из Delphi? |
Previous Top Next |
Code: |
var Session: hTUses; i: integer; ErrorCode: word; ResultCode: word;
procedure BdeError(ResultCode: Word); begin if ResultCode <> 0 then raise Exception.CreateFmt('BDE ошибка %x', [ResultCode]); end;
begin try BdeError(DbiInit(nil)); BdeError(TUInit(@Session));
for i := 1 to High(TableNames) do begin WriteLn('Проверка ' + TableNames[i]);
ResultCode := TUVerifyTable(Session, @TableNames[i, 1], szPARADOX, 'TABLERRS.DB', nil, TU_Append_Errors, ErrorCode); BdeError(ResultCode);
if ErrorCode = 0 then WriteLn('Успешно') else WriteLn('ОШИБКА! -- Для информации смотри TABLERRS.DB!');
WriteLn(''); end; finally BdeError(TUExit(Session)); BdeError(DbiExit); end; end. |
©Drkb::02637
Взято из Советов по Delphi от Валентина Озерова
Сборник Kuliba