|
|
|
In COM,
applications interact with each other and with the system through collections
of functions called interfaces. Note that all OLE services are simply
COM interfaces. A COM interface is a strongly-typed contract between
software components to provide a small but useful set of semantically related
operations (methods). An interface is the definition of an expected behavior
and expected responsibilities
|
|
An application
instantiates a component and calls one of its method. COM method calls are
merely C++ virtual function calls.
|
|
A virtual function table is an array of
pointers to the methods an object supports.
|
|
In C an object
would appear as a structure whose first member is a pointer to the virtual
function table that is, the first member points to an array containing
function pointers
|
|
The function
pointer than calls the function(which is a method for the component).
|
|
So calling a
component method is actually calling a pointer to a function pointer which
calls the function.
|
|
|
|
|