Click here to Skip to main content
15,039,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have for example a constructor to a wrapper made to englobe c++ code like this:
FOONET::ManagedFoo::ManagedFoo(const std::wstring & q)
this is in my clr project...I compile it as dll to use in c#.
After I put the dll as reference and when I look inside the reference for the same constructor I get :
ManagedFoo(std.basic_string_unsigned short,std::char_traits_unsigned short_,std::allocator_unsigned short_ _* q)

why is this ? And more importantly how can I pass a string to that constructor in order to create a ManagedFoo instance ?

1 solution

I managed to change the code in the cli project to request a string and changed the string, inside the method, to wchat_t which I passed over to the C++.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900