Ini_NthSectionName
- Updated2023-02-21
- 1 minute(s) read
int Ini_NthSectionName (IniText handle, int sectionIndex, char **sectionNamePointer);
Purpose
Obtains a pointer to name of the section specified by the 1–based index in sectionIndex.
Do NOT modify the section name or attempt to free the pointer.
Parameters
| Input | ||
| Name | Type | Description |
| handle | IniText | A handle returned from Ini_New. It represents the list of in-memory tag/value pairs. |
| sectionIndex | int | A 1–based index into the list sections in the tag/value list specified by handle. |
| Output | ||
| Name | Type | Description |
| sectionNamePointer | char * | A pointer variable into which the address of the section name is placed. Do NOT modify the section name or attempt to free the pointer. The pointer is valid until the next time the list of in–memory tag/value pairs is modified. If there is no section corresponding to the specified index, the pointer variable is left untouched. |
Return Value
| Name | Type | Description |
| sectionFound | int | If there is a section corresponding to the specified index,
1 is returned. Otherwise, 0 is returned. |
Additional Information
Library: Reading/Writing .ini-Style Files
Include file: toolbox\inifile.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later
Example
Refer to toolbox\ini.cws for an example of using the Ini_NthSectionName function.