Delphi Examples: DbiGetSysConfig

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiGetSysConfig

Return to chapter overview

Get system configuration information:

DbiGetSysConfig retrieves the BDE system configuration information and appends it to the TStringList passed in. This example uses the following input:

 fDbiGetSysConfig(MySysInfo);

 

The procedure is:

procedure fDbiGetSysConfig(var IdapiSysConfig: TStringList);

var

 SysConfigInfo: SYSConfig;

begin

 Check(DbiGetSysConfig(SysConfigInfo));

if SysConfigInfo.bLocalShare then

   IdapiSysConfig.Add('Local Share: ON')

else

   IdapiSysConfig.Add('Local Share: OFF');

 IdapiSysConfig.Add('Net Protocol: ' + IntToStr(SysConfigInfo.iNetProtocol));

if SysConfigInfo.bNetShare then

   IdapiSysConfig.Add('Net Share: ON')

else

   IdapiSysConfig.Add('Net Share: OFF');

 IdapiSysConfig.Add('Network Type: ' + StrPas(SysConfigInfo.szNetType));

 IdapiSysConfig.Add('User Name: ' + StrPas(SysConfigInfo.szUserName));

 IdapiSysConfig.Add('Ini File: ' + StrPas(SysConfigInfo.szIniFile));

 IdapiSysConfig.Add('Language Driver: ' + StrPas(SysConfigInfo.szLangDriver));

end;