Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Anyone knows why methods from a ref class written in CLI actually get "remodeled" when you import the dll in c# ?
C++
ManagedFoo FOONET::ManagedFoo::divide(ManagedFoo % ac_OtherFoo)

gets changed in :
C++
void divide(ref FOONET.ManagedFoo value, FOONET.ManagedFoo ac_OtherFoo)


the first is in my wrapper class and after that I compile a dll and when I import the dll in C# I get the second...I am lost...
Posted
Comments
Sergey Alexandrovich Kryukov 21-Mar-12 16:02pm    
Not clear. "Gets changes" by what?
--SA

1 solution

I guess that is due to the language interoperability.I believe that the first one is written in C++ style,so when it comes to C# style of passing parameters it changes accordingly
 
Share this answer
 
Comments
m0rTu 21-Mar-12 11:46am    
ok...i kind of get that...but how do I actually call that function ? and actually get a ManagedFoo instance back ?
S@53K^S 3-Apr-12 10:05am    
You have to pass the native types into that .So you have to write a little bit of un-managed code.

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