Let's say I have a function such as:
void ConvertCharToSt ring(char* szInput, System::String^ strOutput)
{
strOutput = Marshal::PtrToS tringAnsi(stati c_cast<System:: IntPtr>(szInput ));
}
Clearly if I call the function like this, it won't work because the
handle of strOutput is passed by value and cannot be changed by
Marshal::PtrToS tringAnsi:
System::String^ strMyString;
ConvertCharToSt ring("Some text", strMyString);
This is where I would normally use a pointer to pointer in C++...
What is the proper solution to this problem using the above function
prototype? Also, System::String^ ConvertCharToSt ring(char* szInput); is
not an option.
Thanks guys!
Gary