Problem with Brian Bushay's function

Brian Bushay, from TeamB, sent once to this newsgroup a function
"isbdepresent" (reproduced below) to check whether BDE was installed
at a system or not.
Only this week I tried the routine and verified that my BDE
instalation does not include the IDAPI01.DLL quoted at the line:

  IdapiHandle := LoadLibrary(StrCat(IdapiPath, '\IDAPI01.DLL'));

I tried to substitute that file with another that I knew it was
present (like IDAPI32.DLL) but even with that I got a false result.

Is anything wrong with the original function?
[ ]s,

The Bushay's function:

Function isbdepresent : boolean;
  IdapiPath: array[0..255] of Char;
  IdapiHandle: THandle;

 GetProfileString('IDAPI', 'DLLPath', 'C:\', IdapiPath, 255);
 {next lines isolates the first directorypath from the IdapiPath in
case there
are more}
 if Pos(';',StrPas(IdapiPath)) <> 0 then
   StrPCopy(IdapiPath,Copy(StrPas(IdapiPath), 1,
 IdapiHandle := LoadLibrary(StrCat(IdapiPath, '\IDAPI01.DLL'));
 if IdapiHandle < HINSTANCE_ERROR then result:=false
 { IDAPI is not present on this system }
 else begin
       { IDAPI is present on this system }