IniHeadr.exe Reads Section Headers from .INI Files (104096)
The information in this article applies to:
- Microsoft Platform Software Development Kit (SDK) 1.0
This article was previously published under Q104096 SUMMARY
The Iniheadr.exe sample defines a function called
GetPrivateProfileSections(), which parses a given .INI file and returns a
buffer containing the section headers separated by NULLs and terminated by
a double NULL. SECTION.C contains the function and a necessary helper
function. The sample allows the user to choose an .INI file using the Open
common dialog box. The section headings are then placed in a list box.
The Windows SDK does not define a function to read all of the section
headers from a profile (.INI) file. An application must read the entire
.INI file and parse it to obtain the section headers.
NOTE: Microsoft recommends using Windows's application programming
interfaces (APIs) to read .INI files. The method described below is not
guaranteed to work on future releases, especially for system .INI files
such as WINFILE.INI, WIN.INI, SYSTEM.INI, CONTROL.INI, and so forth.
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kb16bitonly kbfile kbsample kbSysSettings KB104096 |
---|
|