DoneEx INI-File Manager Library  API Help

  GetSection

The function GetSection retrieve the name of section by the section index.

				
int GetSection(long   ini_file_num, 
               long   section_index,
               char** section_name,
               long   buf_len
);				

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 index of the section that is enumerated from begin of INI-file. Space before the first named section belongs to the unnamed section.
section_name
[output] Pointer to pointer to null-terminated string where result will be placed.
buf_len
[input] The reserved length of buffer for section name.

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

Remark
As the unnamed section always presents then the correct value of section_index parameter is more then zero.