dmmorris
14th March 2003 23:32 UTC
WriteINIStr with unpaired value
Does anyone know how to write a simple string to an ini file? I am trying to a value without the =xxxx. That may just point out that the ini file is being used improperly but in this case I don't have control over the format of the ini file. I am guessing that I could also use a file write, but in that case I would have to locate the proper section.
Thanks,
David Morris
Afrow UK
15th March 2003 00:40 UTC
http://forums.winamp.com/showthread....hreadid=128404
This topic should help (read my post at the bottom)
Maybe you can use that instead.
-Stuart
kichik
15th March 2003 12:20 UTC
That's actually a bug. You are supposed to be able to write an empty string as a value. I will fix this ASAP.
kichik
15th March 2003 13:54 UTC
Done.
dmmorris
2nd April 2003 16:19 UTC
With your fix, I can write out a value as:
[somesection]
myvalue=
[nextsection]
but what I actaully need is to write out:
[somesection]
myvalue
[nextsection]...
It could be that the program I am working with uses ini files incorrectly, but I don't have any control over the program.
Thanks,
David Morris
kichik
2nd April 2003 16:25 UTC
That's impossible with WriteINIStr, it's not how INI files are structured. If you want to do it this way you'll have to write manually with FileOpen, FileRead, FileWrite and FileClose.
dmmorris
2nd April 2003 17:51 UTC
Thanks for your help, I was going down that path when I got your message and it looks like it will work.
David Morris