Get the value of a string config variable.
The string is owned by the variable and should not be freed by the user.
pointer to the variable's value
where to look for the variable
the variable's name
0 or an error code