std::wstring by ref
Managed C++/CLI
1
Posts
1
Posters
0
Views
1
Watching
-
is it possible to call a native C++ Method from a Managed(?) C++ DLL and pass a std::wstring by ref? I have a native C++ DLL. This has a static function
IServer * CreateServer();
I created a Managed C++ DLL, imported the native DLL and now trying to make it work..... [DllImport("DoubleFindDll.dll")] extern "C" IServer * CreateServer(); .... IServer srv = CreateServer(); srv->startUp(); std::wstring some_string; srv->FooBar(some_string); //crash here
FooBar is defined as:virtual void FooBar(std::wstring & str) = 0;
and the string is modified inside the method. Im using VS2005. Thank you for any hint.