We don't display ads so we rely on your Bitcoin donations to 1KWEk9QaiJb2NwP5YFmR24LyUBa4JyuKqZ
Post date: Sep 18, 2010 10:26:55 PM
This example, written by Protocol, allows you to write to ini files using pure api.
Function ReadIni(StrIniPath : pchar; StrSection : pchar; StrItem : pchar; StrDefault : pchar) : String;varRetAmount : Integer;StrTemp : String;StrRet : string;begin SetLength(StrTemp,50); RetAmount := GetPrivateProfileString(StrSection, StrItem, StrDefault, pchar(StrTemp), 50, StrIniPath); StrRet := Copy(StrTemp,1,RetAmount); Result := StrRet;End;procedure WriteIni(StrIniPath : pchar; StrSection : pchar; StrItem : pchar; StrText : pchar);begin WritePrivateProfileString(StrSection, StrItem, StrText, StrIniPath);End;