calling c++ function from a c# project

F

fotis

hi there

i'm just learning c# so i have a question for you.
is it possible to call/include/import functions from a c++
project (.cpp) into a c# project?if yes how can i do that?

wishes for happy new year

fotis
 
N

Nicholas Paldino [.NET/C# MVP]

fotis,

One of the ways to do this is if you export the functions in a DLL
(static functions, not object instances), or if you export the objects
through COM so that COM interop may be used.

You can also recompile the C++ solution, or write managed wrappers
around the C++ objects as well.

Hope this helps.
 

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