Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# CLI
Anyone knows why methods from a ref class written in CLI actually get "remodeled" when you import the dll in c# ?
ManagedFoo FOONET::ManagedFoo::divide(ManagedFoo % ac_OtherFoo)
gets changed in :
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 21-Mar-12 4:50am
m0rTu390
Comments
SAKryukov at 21-Mar-12 16:02pm
   
Not clear. "Gets changes" by what?
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Comments
m0rTu at 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 ?
Sastry_kunapuli at 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)

  Print Answers RSS
0 OriginalGriff 304
1 Sergey Alexandrovich Kryukov 255
2 Shweta N Mishra 216
3 Maciej Los 210
4 PIEBALDconsult 174
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,665


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 21 Mar 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100