Brian,
I would combine all the strings into a list and return them to Mathematica along with your result. The result would be in this form: List[List[diag1,diag2,...], List[Real1,Real2,Real3,...]]
WSPutFunction(stdlink, "List", 2);
WSPutFunction(stdlink, "List", 43);
WSPutString(stdlink,diagtxt1);
...
WSPutString(stdlink,diagtxt43);
WSPutReal64List(stdlink, result, size);
You can read about it in this tutorial. Search for
You can use WSTP functions to create absolutely any Wolfram Language expression. The basic idea is to call a sequence of WSTP functions that correspond directly to the FullForm representation of the Wolfram Language expression.
Regards,
Neil