I don't know if this is the right place for asking this
question, but I hope someone can help me (even if you tell
me where I can look for this).
I'm looking for a detailed definition of Windows standard
INI file format.
That is, I'd want an explanation of what you can write in
a standard INI file beyond key or value definitions (how
you have to write comments, where you can put them, how
you have to treat a duplicate key or value, ecc.).
Thanks.
"Samuele" <pimp...@inwind.it> wrote in message
news:3d4301c274e1$2748a0d0$3bef2ecf@TKMSFTNGXA10...
----Example.ini----------------------------------------
;This is a comment: is it correct?
[key1]
;after this comment there will be the first value
valuename1=value1
valuename2=value2
[key1]
;How can I manage this duplicated key?
;- Do I have to stop processing file?
;- Do I have to continue ignoring it?
;Windows API for reading key and values
;ignores duplicated items
;(i.e. GetPrivateProfileString...)
;- How do I have to treat the values included in it?
valuename_Of_Duplicated_Key=value1
valuename_Of_Duplicated_Key=value2
-------------------------------------------------------
Besides, where can I find any documentation about
Windows Ini File Format?
Thanks.
I'm not aware of any documentation for .INI files _in general_. Each
specific user of .INI files documents its own requirements. And the
Profile API set documents what you can do with .INI files. (Also note
that the Profile API does not require that the keys and values that it
manipulates actually reside in a .INI file.)
As you've already discovered, the API does not allow duplicated keys.
This means that if you absolutely must have duplicated keys you're going
to have to write your own .INI file parser and, if you do that, it's
entirely up to you what restrictions you place on the syntax.
Norm