@imaus10 
This is an example of calling the function once with an empty buffer to get the necessary size, then allocating an appropriately sized buffer to contain the string.