COM is a technology from Microsoft that allows objects to communicate without the need for either object to know any details about the other, even the language it’s implemented in.
At the lowest level, COM deals with interfaces and objects and makes a clear distinction between an object’s interface and its implementation. The interface defines how an object is used, but the implementation of the interface is up to the object.
COM defines many interfaces but doesn’t provide implementations
for many of these interfaces. One commonly used interface,
, allows COM objects to be used from a
scripting environment, such as Visual Basic or Python. Although COM
has defined the interface for
it’s the responsibility of the COM objects themselves to
implement this interface, and exactly how they implement it depends
on the object model or functionality the COM object is trying to
Objects that implement the
IDispatch interface are
known as automation objects. The rest of this chapter shows how to
use automation objects from Python, and then we show how to create a
COM object in Python and call from Visual Basic. Chapter 12 covers all these details in greater depth.