Function ReadiniFile (filename, section, ident: string): string; // Read configuration file var ini: tinifile; begin ini: = tinifile.create (filename); result: = ini.readstring (section, ide, '') Ini.free;
procedure writeInifile (const fileName, Section, Ident, Value: string); // write inifilevar ini: tinifile; aPathName: string; begin try aPathName: = ExtractFileDir (fileName); if not DirectoryExists (aPathName) then ForceDirectories (aPathName);
INI: = TiniFile.create (filename); ini.writestring (section, ide, value); ini.free; except end;