From: Tony Johansson on
Hi!

This is not an actual problem but only an example.
Assume you have an .NET assembly and you want to use some useful function in
a dll where the language has been C++.
Is it then nessessary that this C++ dll is a COM dll or DCOM dll.?

//Tony


From: Arne Vajhøj on
On 24-04-2010 18:04, Tony Johansson wrote:
> This is not an actual problem but only an example.
> Assume you have an .NET assembly and you want to use some useful function in
> a dll where the language has been C++.
> Is it then nessessary that this C++ dll is a COM dll or DCOM dll.?

No.

There are multiple ways of utilizing a native DLL (C++) from .NET code:
1) if it is a COM DLL then it can used directly, because .NET and COM
can handle all the details of interaction
2) if it is a Win32 DLL which exposes a C API then it can be
accessed via DllImport similar to how many Windows functions are
called
3) if it is a Win32 DLL which exposes a C++ API then you can write
a mixed mode C++ DLL that exposes a .NET API but delegate to the
native C++ API

Arne