In case of an error, the return value is NULL and
stringSize will be set to -1 (if
stringSize is not NULL).
If the stack item is not a string, the return value is NULL and
stringSize will be set to 0 (if
stringSize is not NULL).
If the stack item is a string, the return value is not NULL, and
stringSize will be the size of the string buffer (if
stringSize is not NULL). In that case, the user is in charge of releasing the returned buffer with
simReleaseBuffer.