我的函数库中的一个函数
//[1-12]检查是否有BDE
function have_bde1:boolean;
var
reg1:tRegistry;
bde_path1:string;
begin
result:=true;
reg1:=tRegistry.Create;
reg1.RootKey:=HKEY_LOCAL_MACHINE;
if not reg1.KeyExists('Software/Borland/Database Engine') then
begin
result:=false;
reg1.Free;
exit;
end;
bde_path1:='';
if reg1.OpenKeyReadOnly('Software/Borland/Database Engine') then
begin
bde_path1:=reg1.ReadString('DLLPath');
if (bde_path1='')or(not fileExists(bde_path1+'idpdx32.dll')) then
begin
result:=false;
reg1.Free;
exit;
end;
end;
reg1.Free;
end;