| T O P I C R E V I E W |
| peter.cook |
Posted - 03/24/2005 : 10:45:38 AM Origin Version (Select Help-->About Origin): 7.5SR5 Operating System: 2000
Hi,
I'd like to add a new key and value to an (nlsf.) ini file with Origin C. How can I do this? I presume I can use writeini to add /alter a value for an existing key.
Thanks,
Cheers,
pete
|
| 2 L A T E S T R E P L I E S (Newest First) |
| peter.cook |
Posted - 03/29/2005 : 12:13:34 AM Thanks Mike,
I'm going to use this to auto-update ini files for all our client users.
Cheers,
Pete
|
| Mike Buess |
Posted - 03/24/2005 : 5:02:05 PM Hi Pete,
Origin 7.5's INIFile::WriteInt and INIFile::WriteString will create the keys and sections named as arguments if they don't already exist. (It will even create the INI file if necessary.) This will add a key called MyInt (and sets its value to 50) to the NLSF Control section of NLSF.ini on the user path.
INIFile ini("NLSF.ini"); ini.WriteInt("NLSF Control", "MyInt", 50);
Mike Buess Origin WebRing Member |
|
|