This chapter examines the COM architecture to show how things work at the physical level. It explains Microsoft's motivation for creating COM and its original design goals. It also explains the problems with C++ and binary encapsulation that motivated Microsoft engineers to create a standard for the physical layout of all COM interfaces. As you'll see, COM connects clients to objects using the principles of interface-based programming. This chapter explains how COM achieves language independence. Microsoft Visual Basic, for example, can map to COM by providing support in the compiler and a run-time mapping layer.
In COM, the code written for clients and the code that defines classes often live in separate binary files. COM clients can't see class definitions, but they still need to create objects. But how can a client application create an object if its server doesn't expose a visible class definition? COM provides an infrastructure in which clients can create and connect to objects without ever seeing the concrete class. This chapter explains the COM services and design requirements that make object activation possible.