TIniPropStorage ? lazarus / 13-General ---------------------------------------------------------------------- jctaborda · 2006-01-26 22:09 Hi, I am trying to use this component but I get an error saying that there's a wrong number of parameters specified. Could anybody show me how to read and write to a file? Thanks PD. bellow is what I'm trying Code: [Select]procedure TfrmPrinc.FormCreate(Sender: TObject); begin   ini1.iniFileName:=ExtractFilePath(Application.ExeName)+'test.cfg';   if not FileExists(ExtractFilePath(Application.ExeName)+'test.cfg') then   begin     ini1.WriteString('DB','HostIP',' ' );        <===Here the error   end;   gHostIP:=ini1.ReadString('DB','HostIP','127.0.0.1'); end; ---------------------------------------------------------------------- felipemdc · 2006-01-27 01:18 Are you trying to store information on a .ini file? You can use TIniFile class from the unit IniFiles. Here is a short example on how to use it: procedure TConfigurations.Save(Sender: TObject); var   MyFile: TIniFile; begin   MyFile := TIniFile.Create('path_to_ini_file');   try     MyFile.WriteBool('General', 'Border', graphicalBorder);     MyFile.WriteInteger('General', 'xSquare', xSquare);     MyFile.WriteString('Unix', 'MyDirectory', MyDirectory);   finally     MyFile.Free;   end; end; This will produce the file: [General] Border=1 xSquare=8 [Unix] MyDirectory=/home/ Change WriteBool to ReadBool to read from an .ini file. Google for "Delphi Ini file" for more information. ---------------------------------------------------------------------- Anonymous · 2006-01-31 13:39 Quote from: "jctaborda"Hi, I am trying to use this component but I get an error saying that there's a wrong number of parameters specified. Could anybody show me how to read and write to a file? Function ReadString(const Ident, Default: string): string;