Hi,
a strange problem ....
I wrote a managed c++ class that has the followig function:
void EndPointsMappingWrapper::GetLastError(char* strErrorMessage) { strErrorMessage = (char*) Marshal::StringToHGlobalAnsi(_managedObject->GetLastError()).ToPointer(); }
As you can see, this is simple methode to copy the managed string of the last error to the unmanaged world (char*)
from my unmanaged class I call this method like that:
char err[1000]; ofer->GetLastError(err);
The Problem:
putting a breakpoint at the managed c++ methode shows that the string is successfully translated into the char*
however, onece I return to the unmanaged class, the content of err[1000] is lost and its empty again...
Any suggesting will be wellcomed...
Ofer