COM Components and COM Interop

The designers of the .NET Framework recognized that even though the framework is easier to use and more flexible than COM for many applications, it won’t replace COM anytime soon. For this reason, they provided the COM Interop facility to let .NET and COM objects interact. Why does the .NET Framework need to worry about COM? There are several reasons:

  • Developers are already using COM components, and a .NET equivalent might not be available.

  • Even where COM components have been developed in-house, for economic or technical reasons, it might not be feasible to rewrite them as .NET objects.

  • Some operating system services, such as the enterprise services offered by COM+, are firmly COM-based.

As you’ll see shortly, it is easy to use a COM object or an ActiveX control from .NET code, and this gives .NET developers access to hundreds of existing COM objects. It is also possible to use a .NET object from COM code, although I’d expect this to be a less common occurrence.

Microsoft Visual C++  .NET(c) Step by Step
Microsoft Visual C++ .NET(c) Step by Step
ISBN: 735615675
Year: 2003
Pages: 208 © 2008-2017.
If you may any questions please contact us: