unit Findbde; interface implementation uses Controls,SysUtils,WinTypes,WinProcs,Dialogs; var IdapiPath: array[0..255] of Char;IdapiHandle: THandle; initialization GetProfileString('IDAPI', 'DLLPath', 'C:\', IdapiPath, 255);{следующие строки "изолируют" первый путь к каталогу из IdapiPath в случае, если их несколько}if Pos(';',StrPas(IdapiPath)) <> 0 thenBeginStrPCopy(IdapiPath,Copy(StrPas(IdapiPath), 1,Pred(Pos(';',StrPas(IdapiPath)))));End;IdapiHandle := LoadLibrary(StrCat(IdapiPath, '\IDAPI01.DLL'));if IdapiHandle < HINSTANCE_ERROR thenBeginif MessageDlg('ОШИБКА: Borland Database Engine (IDAPI) не найдена' +'перед следующей попыткой ее необходимо установить....',mtError, [mbOK], 0) = mrOK then Haltend{ IDAPI в системе не установлена }else beginFreeLibrary(IdapiHandle);{ IDAPI Установлена в системе }end; end. |
[000623]