procedure TForm1.Button1Click(Sender: TObject);
var
ini : TIniFile;
Sections : TStringList;
begin
if OpenDialog.Execute then
begin
ini := TIniFile.Create(OpenDialog.FileName);
Sections := TStringList.Create;
ini.ReadSections(Sections);
ShowMessagefmt('Section Count: %d',[Sections.Count]);
ini.ReadSectionValues(Sections[0],Sections);
ShowMessagefmt('Id of Section[0] Count:%d',[Sections.Count]);
Sections.Free;
ini.Free;
end;
end;