[.net] String^ to std::wstring

Started by
0 comments, last by Promit 16 years, 7 months ago
I have a managed C++/CLI class that uses some native code in the member functions. I need to convert a String^ to std::wstring. What is the easiest way?
-----Quat
Advertisement
Use PtrToStringChars in vcclr.h to get a pin_ptr<const wchar_t>, and construct a wstring from that pointer.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

This topic is closed to new replies.

Advertisement