Autor Beitrag
michaelarban
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Di 02.06.09 10:54 
hallo,

ich habe eine Konfigurationsdate "meineKonfig.conf" (also keine INI-Datei), welche auch keine Sectionen hat.

Aufbau:
Parameter1=irgendeinWert
name=chef
ip=111.111.111.111

gibt es in Delphi Funktionen zum einfachen lesen der Parameter aus dieser Konfig-Datei?

danke


Moderiert von user profile iconNarses: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Di 02.06.2009 um 13:09
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Di 02.06.09 11:24 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var
sl:TStringlist;
begin
 sl:=TStringlist.Create;
 try
 sl.LoadFromFile(Filename);
 erg1 := sl.Values['Parameter1']
 finally
 sl.Free; 
 end;
end


Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
michaelarban Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Mi 03.06.09 09:41 
danke, klappt wunderbar