用Delphi读写ini文件
uses
IniFiles;
Function INIReadString(aFilePath,const Section, Ident, Default: string):String;
Var
MyIniFile:TInifile;
Begin
Result := Default;
If
Try
MyIniFile:=TInifile.Create(aFilePath);
Result := MyIniFile.ReadString(Section,Ident,Default);
Fillay
MyIniFile.Free;
End;
End;
Function INIWriteString(aFilePath,const Section, Ident, aStr: string):Boolean;
Var
MyIniFile:TInifile;
Begin
Result := False;
Try
MyIniFile:=TInifile.Create(aFilePath);
MyIniFile.WriteString(Section,Ident,aStr);
Result := True;
Fillay
MyIniFile.Free;
End;
End;