function readInifile(fileName,section,Ident:string):string;? //讀取配置文件
var
? ini:tinifile;
begin
? ini:=tinifile.Create(fileName);
? result:=ini.ReadString(section,ident,'');
? ini.Free;
end;
procedure writeInifile(const fileName,Section, Ident, Value: string); //寫inifile
var
? ini:tinifile; aPathName:string;
begin
? try
??? aPathName:= ExtractFileDir(fileName);
??? if not DirectoryExists(aPathName) then
????? ForceDirectorIEs(aPathName);
??? ini:=tinifile.Create(fileName);
??? ini.WriteString(Section, Ident, Value);
??? ini.Free;
? except
? end;
end;