using c# dll in project c++ -


i want use dll made in c#(visual studio 2008) in c++ project(visual studio 2003). how ? please heeelp

there more com interop, msdn faq lists lesser known methods:

2.2 how call .net assembly native visual c++?

there 4 methods call .net assembly native vc++ code. microsoft all-in-one code framework has working examples demonstrate methods.

  1. native vc++ module calls clr hosting apis host clr, load , call .net assembly. (all-in-one code framework sample code: cpphostclr)

  2. if .net assembly can exposed com component, native vc++ module can call .net assembly through .net – com interop. (all-in-one code framework sample code: cppcomclient)

  3. reverse pinvoke: managed code call native passing delegate native code can call back. (all-in-one code framework sample code: cspinvokedll)

  4. if module containing native vc++ code allowed enable clr, native vc++ code can call .net assembly directly through “it works”, or “ijw”, mechanism. (all-in-one code framework sample code: cppcliwraplib)


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

gdi+ - WxWidgets draw a bitmap with opacity -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -