Update specified lines of ini file.
bool update_ini_line( INIFile & iniFile, LPCSTR lpcszSectionName, LPCSTR lpcszKeyName, LPCSTR lpcszValue )
Returns true for success or false not.
EX1
void update_ini_line_ex1() { Tree trIni; INIFile iniFile("NLSF.ini"); char szSection[] = "Origin Basic Functions"; if(tree_read_ini_section(trIni, iniFile, szSection )) { out_tree(trIni); trIni.OriginBasicFunctions.AddTextNode("Func1", "Func1"); //replace "Func1" with "Func2" if( update_ini_line(iniFile,szSection,"Func1","Func2") ) out_str("update successfully"); else out_str("fail to update"); } }
tree_read_ini_section
origin.h