Here are the declarations that you need to use this DLL in Delphi 2 and 3:

Procedure IDX_SetIndexDirectory(IndexPath,SerNum:PChar); stdcall; external 'idxsrch.dll';
Procedure IDX_SetExcludedWords(ExWords:PChar); stdcall;  external 'idxsrch.dll';
Function IDX_AddKeyWords(nID:integer;WType,Words: PChar):integer; stdcall; external 'idxsrch.dll';
Function IDX_RemoveKeyWords(nID:integer;WType,Words: PChar):integer; stdcall; external 'idxsrch.dll';
Function IDX_DoSearch(Expr:PChar; Precise: integer ):integer;stdcall; external 'idxsrch.dll';
