how can i call C# method in c++ code?

  • Thread starter Thread starter kumarabhijit
  • Start date Start date
K

kumarabhijit

Hi!

Can anyone tell me how can i call C# method in c++ code?

Thanks in advance!

Regards
Abhijit
 
| Hi!
|
| Can anyone tell me how can i call C# method in c++ code?
|
| Thanks in advance!
|
| Regards
| Abhijit
|

You can't call a C# method from C++, at least not directly. You have two
options to call into managed code from unmanaged C++:
1. you expose your classs/methods as COM interfaces to be consumed by your
vc++ COM client, that is, you use COM interop.
2. You create a mixed native/managed C++ wrapper class using VS2005's
C++/CLI.
Detailed info can be found on MSDN, search for "C++ interop".

Willy.
 
Hi Willy,

Thank you very much for your reply.I will go through the MSDN "C++
interop".

Regards
 
Back
Top