Get a string from an. ini file
Var
Strresult:pchar;
Begin
GetPrivateProfileString (
Name of the title in ' Windows ',//[]
' Nullport ',//= before the name
' NIL ',//If the string is not found, the default value returned
Strresult,//Store get character
100,//Get maximum allowable length of character
' C:forwin95win.ini '//called filename
);
Edit1.text:=strresult; Show Get string
Get an integer from an. ini file
Edit1.text:=inttostr (Getprivateprofileint (
The name of the title of ' Intl ',//[]
' Icountry ',//= before the name
0,//If an integer is not found, the default value returned
' C:forwin95win.ini '//called filename
));
Writing a string to an. ini file
WritePrivateProfileString (
Name of the title in ' Windows ',//[]
' Load ',//string to be written before ' = '
' Accca ',//data to be written
' C:forwin95win.ini '//called filename
);
Writing an integer to an. ini file
Writeprivateprofilesection (
Name of the title in ' Windows ',//[]
' read=100 ',//data to be written
' C:forwin95win.ini '//called filename
);