This function retrieves an entry value as a character string from the specified section in the specified initialization file.
char PIPTR * section,
char PIPTR * entry,
char PIPTR * default,
char PIPTR * buf,
char PIPTR * file );
The number of bytes copied into buf, not including the null terminating character.
Null-terminated string that specifies the section of the file containing the entry. This section name should not include the square brackets ("").
Null-terminated string containing the entry whose associated string is to be retrieved
Null-terminated string that specifies the value for the given entry if the entry cannot be found
Buffer that receives the character string
Size in bytes of buf
Null-terminated string that identifies the initialization file
This function is implemented on Microsoft Windows platforms as a macro for the native function GetPrivateProfileString.
The match on section and entry names is not case-sensitive.
The default string is returned if the section is absent, the entry is absent, or if the file is not found. In this case, the return code is set to the length of the default string.
If a NULL is passed as the section argument, all section names without the surrounding brackets and without leading or trailing spaces are returned in the buffer. Each section name is separated by a null character from the following section name and the list is terminated by two null characters.
If a NULL is passed as the entry argument, all entry names without the surrounding brackets and without leading or trailing spaces are returned in the buffer. Each entry name is separated by a null character from the following entry name and the list is terminated by two null characters.