ini文件操作
各位高手,如何对ini文件操作啊?我能从ini文件中读取出信息,却不知道如可写进去,下面是我的源码(CVI8.5版). cvi有例子。自带的。 Writes the tag/value pairs in the list identified by handle to the file identified by pathname.If you want to write the data to a destination other than a file, use the Ini_WriteGeneric function.
Prototype
int Ini_WriteToFile (IniText Handle, const char Pathname[]); 上面是存文件。 写信息可用这些。 先用Ini_PutDouble()写数据进去,再用int Ini_WriteToFile (IniText Handle, const char Pathname[])这个执行下,INI文件就被改动了,这个今天我已经试出来了!可是对INI文件操作时可否将Section或是Item中的名称改变????????????我只会将它值Value改变! 像是没有这功能。
可以复制到你要的名字的SECTION里。再删除旧的不就可以了么。 不是很明白?? 像是没有这功能。
可以复制到你要的名字的SECTION里。再删除旧的不就可以了么。
胆生毛 发表于 2009-3-7 19:53 http://www.cpubbs.com/bbs/images/common/back.gif
他的意思是说:你新建一个项,并将它复制到你要的section里,然后删除新建项!
(不过新建后,如果不是必要的话,我就直接删除不要的项,那样岂不是更好?) 意思我是明白了,可是用哪个函数新建一个项啊?? 看5楼! 哦,知道了!多谢。
页:
[1]