There is one of two ways.
First write or modify the function to be more "LabVIEW friendly" LabVIEW can pass you a pointer to a c string and the function can fill in the body(be careful to allocate space in the labview string before calling) but it can not move memory for you. For a pointer to a pointer or a returned pointer, either your routine must do the moving or if the memory pointed to is static, you can call a windows DLL function to move the memory into labview space. It may be most straight forward if you write a "helper" routine (first option)
Stu