Jump to content
  • Advertisement
Sign in to follow this  
fatima

using c++ inside c#

This topic is 2548 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!