inif.ReadSectionで正しくキー名を取得するには?

解決


ぱぱ  2007-01-24 14:20:11  No: 24576  IP: 192.*.*.*

下記のようにコーディングしています。

var
  i: Integer;
  inif: TIniFile;
  sKeyAry: TStrings;
begin
  if FileExists(TimeIniFile) then begin
    inif := TIniFile.Create(TimeIniFile);
    sKeyAry := TStringList.Create;
    try
      inif.ReadSection(IniSection, sKeyAry);
      for i:=0 to sKeyAry.Count-1 do begin
        MessageDlg(sKeyAry.Names[i], mtWarning, [mbOk], 0);

inif.ReadSectionの部分で正しくsKeyAryにキー名が入ってきません。
確認でMessageDlgに出力しても文字列が表示されません。
どの部分が間違えているのでしょうか?

よろしくお願いします。

編集 削除
deldel  2007-01-24 14:33:46  No: 24577  IP: 192.*.*.*

ReadSection → ReadSectionValues かな。

編集 削除
ぱぱ  2007-01-24 14:36:22  No: 24578  IP: 192.*.*.*

早速のレスをありがとうございます。
解決しました。

編集 削除