Hmm, I haven't worked with the Xerxes-C library myself, but - assuming you are working with
this class - isn't the third parameter supposed to be the string buffer that is to receive the resulting string? You're passing an int instead, not even a pointer. I wonder how does this even compile? Moreover, the 4th parameter is supposed to hold the size of the string buffer passed as the third parameter. You did not initialize that value though,
str
may hold any value, and the function may be throwing because the value is insensible.
I suggest you read the API documentation and pass the right kind and types of parameters.