Re: Why COM?
<firstname.lastname@example.org> ha scritto nel messaggio
When should we decide that we should have a com abject instead of
For example, if you want to expose some object model from your DLL, if you
build a "normal" C++ DLL, you can use that only if you compile the calling
..EXE code with the *same* version of the compiler, and with the same CRT
For example, if you have a "normal" C++ DLL built using Visual C++ 6, you
can't use that in an EXE built using Visual Studio (C++) 2005.
Instead, if your DLL is a COM DLL, you can use that from whatever
compiler/environment that supports COM.
So, for example, you can build a COM DLL using Visual C++ 6, and use that
from Visual C++ 2005, or viceversa.
You can also use objects exported from a COM DLL in other languages,
different from C++. For example, you can build a COM DLL in C++ to do some
advanced calculations (requiring the power of C++), and then you can use
this DLL from Visual Basic 6, or from C# or VB.NET (using COM Interop).
So, a COM DLL offers a lot more versatility, language-independency and power
than a normal C++ DLL.