Ini_SetSectionFilter
int Ini_SetSectionFilter (IniText handle, Ini_SectionFilterFunc sectionFilterFunction, void *callbackData);
Purpose
Installs a callback function that controls which sections are read into the IniText parameter during a call to Ini_ReadFromFile or Ini_ReadGeneric.
This filtering callback function is useful when you want to read a subset of a large .ini file without the overhead of reading the entire file into memory.
Parameters
| Input | ||||
| Name | Type | Description | ||
| handle | IniText | A handle returned from Ini_New. It represents the list of in-memory tag/value pairs. | ||
| sectionFilterFunction | Ini_SectionFilterFunc | A pointer to a callback function that is called when each section name is read. The value returned by this callback function determines whether the section is read into the IniText or discarded. The prototype for the callback function is: int CVICALLBACK FilterFunction(IniText theIniText, void *callbackData, char *sectionName); The Filter Function should return 1 (TRUE) if the section is to be read into the IniText. Otherwise, it should return 0 (FALSE).
|
||
| callbackData | void * | A user defined value that is passed to the Section Filter Function in its callbackData parameter each time it is called. | ||
Return Value
| Name | Type | Description |
| status | int | This function always returns 0. |
Additional Information
Library: Reading/Writing .ini-Style Files
Include file: toolbox\inifile.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later
