passing unicode string from C# exe to C++ DLL
- by Martin
Using this function in my C# exe, I try to pass a Unicode string to my C++ DLL:
[DllImport("Test.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)]
public static extern int xSetTestString(StringBuilder xmlSettings);
This is the function on the C++ DLL side:
__declspec(dllexport) int xSetTestString(char*…