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

解決


ぱぱ  2007-01-24 23:20:11  No: 24576

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

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 23:33:46  No: 24577

ReadSection → ReadSectionValues かな。


ぱぱ  2007-01-24 23:36:22  No: 24578

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


※返信する前に利用規約をご確認ください。

※Google reCAPTCHA認証からCloudflare Turnstile認証へ変更しました。






  このエントリーをはてなブックマークに追加