I wrote a C# application that uses an unmanaged c++ dll via managed c++ dll. In the unmanaged dll, there's a callback that one of its params is std::string &.
I can't seem to find the right way to wrap this with the managed dll. When I use String ^, the callback works, but the C# application does not get anything in the string. When I used String ^%, things started to crash in other places that does not seem to be related (maybe memory corruption).
So my question is, what's the right way to do this?
Thanks