Re: Why COM?
<doublemaster007@gmail.com> ha scritto nel messaggio
news:4c10f827-dcd6-4e22-ac1c-cef66bfa7bd7@w34g2000prm.googlegroups.com...
When should we decide that we should have a com abject instead of
normal dll??
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
settings.
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.
HTH,
Giovanni