efryevt
asked on
How to pass strings from C++ to C#
Here is what I am trying to do:
I have a C# application that contains an unmanaged C++ project. The C++ project is responsble for collecting messages from a "server" via ethernet then firing an event so that the C# knows that there is a new message. Then the C# reads the message.
I have the event working, but I am seeing issues with getting the string to the C# code. In the C++ dll the message is available as a wstring. What is the best way to do this?
I have a C# application that contains an unmanaged C++ project. The C++ project is responsble for collecting messages from a "server" via ethernet then firing an event so that the C# knows that there is a new message. Then the C# reads the message.
I have the event working, but I am seeing issues with getting the string to the C# code. In the C++ dll the message is available as a wstring. What is the best way to do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER