Some time ago I had a similar problem - i need to call dll-functions with structs containing pointers to strings or other structs.
I solved the problem using strcpy-API-functions, which can be used to copy strings to another memory location and then return a pointer to the new memory location.
This pointer can be used afterwards as an I32-value within the struct.
Please mention, that you will have to control memory-allocation for this manually (allocating and freeing).
Martin