Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sectionless Get/Write in INI files?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00597735
Message ID:
00597918
Views:
9
>I have to get entry values from an .ini file (srcsafe.ini, fwiw) that are not in a section: they are in the header of the file, before the sections. I'd also like to write to that non-section. Other than alines() <s>, how is this done? The WIN32API functions seem to always write a section, even if it's a blank ([]) section.
>
>thanks,
>
Hank,

Been awhile. Good to see you.

The solution is the one you've already implemented. Each section of an INI file must have a header surrounded with [ and ]. Otherwise, the API file parser won't be able to locate the entry. This is because duplicate value names are allowed within different sections. If you have DEVICE= in one section, it's prefectly legal to have another in a different section. The header is the way these are distinguished.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform