Método 1
-------- // Añadimos: #include <bde.hpp>
bool BdeInstalado(void)
{
return ( DbiInit(NULL) == DBIERR_NONE );
}
Método 2
--------
// Añadimos: #include <registry.hpp>
bool BdeInstalado(void)
{
bool fBdeInstalado = false;
TRegistry *reg = new TRegistry;
try
{
reg->RootKey = HKEY_LOCAL_MACHINE;
fBdeInstalado =
reg->OpenKey("\\Software\\Borland\\Database Engine", false)
&& FileExists(reg->ReadString("DLLPATH") + "idapi32.dll");
}
__finally
{
delete reg;
return fBdeInstalado;
}
}
---