Call C# from C

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.
I know we can call native C or C++ function from C#.
I want to do reverse. I want to call C# function from C or C++.
What is the best way to do it.
It is just simple one time call of one of the function in C#.

Thank you in advance.
 
Only way I know how is to wrap the C# function in COM and do it that way.
Seems like a lot of overhead for one function call though.

Chris
 
CLR is supposed to support the JIT machanism turns out it really does not
care of the language as long as those codes will be able to compiled by CLR.
Actually the PE file's IL info is the souce codes in the viewpoint of CLR.

Turns out, you could easily make your codes CLR compatible by a complier
Option.

Of couse C++ could invoke C# method

--Paul
 
Back
Top