Quote:

You are also able to comment entire sections in .INI files by placing a star before the section name...

Code:
*[section1]
thing1 = some stuff
thing2 = some more stuffand a return
thing3 = even more stuff
thing4=line1line2



Lee




That's not actually true.

What you are doing is making the section name invalid. If there is a section earlier on in the file then the values will belong to that section.

For example:
Code:

[AAA]
Foo="Section 1"
*[BBB]
Bar="Section 2"



If you ReadProfileString("myini.ini","AAA","Bar") you will get "Section2" returned. Also enumerating section "AAA" will return the values from both sections.

There is no way to comment out a section other than commenting out every line.

You can make it invalid by prefixing it with any character including an asterisk, but whether it will work as you expect will depend upon the application.