Hi C++ experts ,

actually my knowledge is not very good I can call my self degree 2 beginner ,
But I know how to do things in C#, and write now I need to execute what I have already done in C#, in a c++ code.
MORE EXPLANATION : I need my c++ (native code ) to perform some actions that I already have a c# code that perform it,
is there a way to use my already code in C# to be executed in C++ , (the C++ code is to be dll file, so I think that saving C# as dll is not helping , is it?), I read somewhere in the net that there is a way but I could not get it ,

I hope I made my self clear
I really need urgent help in this
Thanks for who took time and read, double for how is going to answer.

8 Years
Discussion Span
Last Post by mitrmkar

> I need my c++ (native code ) to perform some actions that I already have a c# code that perform it
You do it the same way you call managed code from VB6: Make sure the C# code has a COM callable wrapper and use COM from native C++ to access the C# code through the COM interface. Edward can't offer much in the way of details though, due to lack of experience in that area. Ed's written managed DLLs for a COM driver, but not the other way around. :(


Thanks all for replying,
mitrmkar, the link is (what i need) 's opposite , it discusses, as I understood, linking c++ in C# but what i want is to link C# to native C++,
dll in native c++ caused me problems , any advices, please !

Thanks for help!


It assumes that you have a managed DLL + a native application. (Hopefully this one is of more use than the previous one.)

yes it helps and yes it is almost that way ,
but in addition the native code is supposed to be dll too, is it ok to call dll inside a dll?

Thanks again :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.