content:
To use the .ini file, you need to read and write .ini files, listed the following method to your reference: From .ini files, get strings VarstrRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRING: PCHAR; BegingeTPrivateProfileString ('Windows', // [] Name 'nullport', // = Name 'NIL', // If the string is not found, the returned default strRRESULT, / / storage obtains character 100, // get characters Allow the maximum length 'c: /forwin95/win.ini' // file name); edit1.text: = strRRESULT; // Displays the acquisition string from the .ini file to get an integer edit1.text: = INTOSTR (GetPrivateProfilein) The name of 'Intl', // [] 'ICOUNTRY', / / = Name 0, // If an integer is not found, the default value of the returned 'c: //win95/win.ini' // call File name); write the name of the .ini file in the string WritePrivateProfileString ('Windows', // [], 'LOAD', / / To write the string 'ACCCA' before "=", / / To write data 'c: /forwin95/win.ini' // The file name called; to the .ini file, write an integer WritePrivateProfilesection ('Windows', // [], the name of the title "Read = 100' , // The file name to be written in 'c: /forwin95/win.ini' //); the above method is to call the API function, which is described below to get the method of getting characters from the .ini file Var myini: tinifile; beginmyini: = tinifile.create ('win.ini'); // Call file name Edit1.Text: = Myini.ReadString ('Desktop', 'Wallpaper', '); // get character End; method of writing characters in .ini file var myini: tinifile; beginmyini: = tinifile.create ('win.ini'); // Call file name Delphiini.writestring ('desktop', 'Wallpaper', ' C: /A.BMP '); END;
Of course, this is very easy and crack, you can use xor to do or operate, or inverted the anti-value ... Specific depends on how you achieve it. In short, this article only throws jade.