Monday, 19 August 2013

Returing a string whose length is unknown a priori from C++ called from C#

Returing a string whose length is unknown a priori from C++ called from C#

I have searched far and wide for an answer to my question, and all the
solutions are not acceptable, not applicable, and/or confusing. I am
needing to return a string from a function implemented in C++ back to the
calling code in C#. The returned string needs to be returned as a
parameter rather than a return value since I need to pass/return multiple
strings for some functions. The length of the string varies, so I can't
just allocate a buffer, etc. Any help would be appreciated.

No comments:

Post a Comment