If the section name does not exist then the unnamed section is used as a default.
Returns the string "value" from an existing "name=value" pair in the selected section of a configuration file.
If the value identified by pKeyName does not exist in the section then the defaultValue is returned, and that default value is automatically inserted into the section. In order to save an automatically inserted value to the configuration file on disk make sure that the flushConfigFile has the "withDefaults" flag set to true.
- Parameters
-
pSectionName | [ in ] Pointer to string defining the section to write the keyName=value pair |
pKeyName | [ in ] Pointer to string defining the name part of: "name=value" |
defaultValue | [ in ] Pointer to a boolean value to return if key does not exist, set to NULL if no default desired. |
pValue | [ out ] Pointer to a boolean with the value of the key. |
- Returns
Success | P6R::eOk | |
Failure | P6R::eInvalidArg | If pKeyName (or pValue) is NULL or contains a reserved character. |
P6R::eNotInitialized | A successful call to initialize was not made before this call. |
P6R::eFormatError | If length of pSectionName + pKeyName is > P6R::MAX_IDENTIFER_SIZE |
P6R::eNoMemory | Insufficient memory to look up value. |