# Ini_SetSectionFilter

int Ini_SetSectionFilter (IniText handle, Ini_SectionFilterFunc sectionFilterFunction, void *callbackData);

## Purpose

This function installs a callback function that controls which sections are read into the IniText 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).
| Note You can pass 0 to remove a previously installed Section Filter Function.
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 | integer | This function always returns 0.