DoneEx INI-File Manager Library  API Help

  SearchKey

The function SearchKey retrieves the index of key by it's name.

				
long SearchKey(long        ini_file_num, 
               long        section_index, 
               const char* key_name
);				

Parameters
ini_file_num
[input] INI-file number which points to the data in memory structure. This number has to be saved from the return value of the previous call CreateINI or LoadINI functions.
section_index
[input] The zero-based index of the section that is enumerated from begin of INI-file. Space before the first named section belongs to the unnamed section.
key_name
[input] Pointer to a null-terminated string that specifies the name to be searched for the key index.

Return Values
If the function succeeds, the value returned is the key index. If the function fails, the return value is -1.