Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • Last Modified:

call .net assembly from native c++

Hi all,

I would like to call a .net assembly from my C++ application, like "System.Data".
Is that possible, and if yes, then how?
0
trustworthy
Asked:
trustworthy
2 Solutions
 
jkrCommented:
Technically speaking that's possible using COM/Interop (http://msdn.microsoft.com/en-us/library/sd10k43k%28v=vs.110%29.aspx) using the .NET objects like COM objects. Yet I'd rather evaluate if it wasn't worthwile to choose a homogeneous setup if possible.
0
 
peprCommented:
It is possible in Windows environment when using Visual Studio C++. The compiler uses the extension of the C++ language for "managed" code. Search for the "managed native interoperability" -- you get for example here http://msdn.microsoft.com/en-us/library/zbz07712.aspx

When done correctly, using the .NET component from a native code should be seamless. However, I do not have first hand experience (programming in native only).
0
 
trustworthyAuthor Commented:
It's gruesome, but it works. Or seems to work. thank you
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now