views:

127

answers:

1

There is any way to use C++\C# .Net assemblies\DLL's in win32 C++ (unmanaged) applications?

+5  A: 

Is it possible to use .Net, from any language, in C++ in a 100% pure unmanaged application?

No it is not. Using managed code requires the CLR to be in the process.

Is it possible to use .Net, from any language, in C++ in an unmanaged application that does not specifically start up the CLR?

Yes. It is possible to use the managed code via COM Interop. In this case the native code need not know that the CLR is even in process. It would create the COM objects as it would if they were defined in C++ and not know the difference.

JaredPar
http://msdn.microsoft.com/en-us/library/zsfww439.aspx <-- MSDN article about exposing .net types to COM
cmw
Any idea of how to unload the default managed AppDomain when you use the COM methodology you described?http://stackoverflow.com/questions/2330390/how-to-unload-the-default-net-appdomain-from-an-unmanaged-application
jpierson