DoneEx INI-File Manager Library  API Help

  GetKeyName

The function GetKeyName retrieves the name of key by the key index inside indicated section.

				
int GetKeyName(long   ini_file_num, 
               long   section_index, 
               long   key_index, 
               char **key_name, 
               long   buf_size
);				

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.
key_index
[input] The zero-based index of the key to be searched key name.
key_name
[output] Pointer to pointer to null-terminated string where result key name will be placed.
buf_size
[input] The size of buffer reserved for the key name.

Return Values
If succeed the GetKeyName function returns zero. Otherwise it returns value not equal to zero. To get extended error information, call GetLastErr.