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

K

kumarabhijit

Hi!

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

Thanks in advance!

Regards
Abhijit
 
W

Willy Denoyette [MVP]

| 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.
 
K

kumarabhijit

Hi Willy,

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

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top