next up previous contents index
Next: 4.1 Objects and Interfaces Up: Part II: Interfaces Previous: 3.2.5 types.h: basic machine-independent

4 The Component Object Model

 

The Component Object Model (COM) is an architecture and infrastructure for building fast, robust, and extensible component-based software. This chapter describes the basic subset of COM that is used by the OSKit; the complete COM specification is available from Microsoft's web site.

At its lowest level, COM is merely a language-independent binary-level standard defining how software components within a single address space can rendezvous and interact with each other efficiently, while retaining a sufficient degree of separation between these components so that they can be developed and evolved independently.

To achieve this goal, COM specifies a standard format for dynamic dispatch tables associated with objects. These dispatch tables are similar in function to the virtual function tables (``vtables'') used in C++, but they are specified at the binary level rather than the language level, and they include additional functionality: in particular, a standardized run-time type determination (``narrowing'') facility, and reference counting methods. This minimal basis allows a software component to dynamically determine the types of interfaces supported by another unknown component and negotiate a common ``language'' or set of interfaces through which further interaction can take place. (``Parlez vous Francais? Sprechen Sie Deutsch?'') COM builds a whole range of services on top of this basic facility, such as cross-address-space RPC (MIDL), object linking and embedding (OLE), scripting (OLE Automation), etc. However, it is primarily this lowest-level facility that is used by and relevant to the OSKit.





University of Utah Flux Research Group