
Zitat von
markus5766h:
Hier mal ein Beispiel zu TIniFile:
Delphi-Quellcode:
uses IniFiles;
procedure ReadIni;
var
Ini : TIniFile;
Password : String;
begin
Ini:= TIniFile.Create(Pfad und Dateiname);
Password := Ini.ReadString('Password', 'PW1', 'Fehler');
Ini.Free;
end;
procedure SaveIni;
var
Ini : TIniFile;
Password : String;
begin
Ini := TIniFile.Create(Pfad und Dateiname);
Ini.WriteString('Password', 'PW1', Password);
Ini.Free;
end;
Ich vermisse sehnlichst die Ressourcenschutzblöcke und eine Fehlerbehandlung.