using c++ inside c#

Started by
2 comments, last by Matt-D 12 years, 3 months ago
hi everyone
is it possible to use native c++ inside c#? for example by exporting classes to a dll and using them in c#, or any thing like c++ interfaces.
I love c++ but lack of a realy acceptable ui library(powerful and easy to use, like winforms for c#) is a disaster. combining native and managed c++ can't be a good solution.
thank you for your attention.
Advertisement
Yes, C++ DLLs can be called from C# with platform invoke (often abbreviated as P/Invoke or less commonly pinvoke). One thing in particular to look at is the DllImportAttribute which allows you to mark function declarations as coming from DLLs. There are other options such as creating your native C++ code as COM objects that C# can also consume or creating a C++/CLI managed wrapper for the C++ code.
thank you.
You might also be interested in CXXI: http://tirania.org/blog/archive/2011/Dec-19.html

This topic is closed to new replies.

Advertisement