Chapter 4: COM Applications
All applications, that is, running programs that define a task or a process be they client or servers, have specific responsibilities. This chapter examines the roles and responsibilities of all COM applications and the necessary COM library support functions for those responsibilities.
In short, any application that makes use of COM, client or server, has three specific responsibilities to insure proper operation with other components:
- On application startup, verify that the COM Library version is new enough to support the functionality expected by the application. In general, an application can use an updated version of the library, but not an older one or one that has undergone a major version change.
- On application startup, initialize the COM Library.
- On application shutdown, uninitialize the COM Library to allow it to free resources and perform any cleanup operations as necessary.
Each of these responsibilities requires support from the COM Library itself as detailed in the following sections. For convenience, initialization and uninitialization are described together. Additional COM Library functions related to initialization and memory management are also given in this chapter.