Please help,
my c++ function:
extern "C" REGISTRATION_API void calculate(char* msg)
{
//some calculation here
msg = "some text";
}
my c# call:
[DllImport("thecpp.dll")]
static extern void calculate(StringBuilder sMsg);
private void button4_Click(object sender, EventArgs e)
{
StringBuilder msg = new StringBuilder();
calculate(msg);
MessageBox.Show(msg.ToString());
}
No matter what i put in msg, the stringbuilder is always empty? why? whats wrong? any ideas? please share