In this chapter we've looked at the fundamentals of COM, which included examining how to create and use interfaces, how to add automation to an existing application and create automation controllers, and how to add event sinks so that client applications can be notified of new information by a server object. We also quickly looked at how to create ActiveX controls.
COM has become a foundation for allowing Windows programmers to write and share reusable software modules that can interoperate with other software modules. COM interfaces and objects, and the clients and servers that utilize them, can be implemented by virtually any development language and environment that supports pointers. This includes Visual Basic, C++, and Delphi. In essence, COM enables Windows programmers to achieve essentially three things:
Writing reusable code and software modules that can be used by a wide variety of programming languages. This includes ActiveX controls.
Controlling and utilizing elements of other applications. This is accomplished using type libraries and OLE automation.
Enabling applications and their objects to interoperate with other applications located on remote machines. This is provided through Distributed COM (DCOM).
It is almost certain that COM will continue to have a strong presence within the Windows and .NET programming community in the future. The topics we covered provide the essentials in using COM and its related extensions including COM+ and DCOM. DCOM is discussed in the next chapter.
Top |