0
thanks.. it works.. thanks for the advice
0
extern "C" __declspec(dllexport) int
test(string &msg)
{
msg = "test";
return 0;
}
you are attempting to get the string from c# by refereance [ &msg ] this is probably where you are having the problem since the error message tells you that This is often an indication that other
memory is corrupt.
try sending the string using an (LPTSTR msg) int a = test(aaa); this should work as it does in C++ builder for me.
extern "C" __declspec(dllexport) int stdcall
test(LPTSTR msg) //not sure if stdcall is valid for your situ
{
msg = "test";
return 0;
}
0
I've tried to use string but the result is same.
0
Can u replace "StringBuilder" with "string" and try?