call .net assembly from native c++

Posted on 2014-08-07
Last Modified: 2014-08-08
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?
Question by:trustworthy
    LVL 86

    Assisted Solution

    Technically speaking that's possible using COM/Interop ( using the .NET objects like COM objects. Yet I'd rather evaluate if it wasn't worthwile to choose a homogeneous setup if possible.
    LVL 28

    Accepted Solution

    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

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

    Author Comment

    It's gruesome, but it works. Or seems to work. thank you

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
    Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode ( They will have you believe that Unicode requires you to use…
    The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
    The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now