Afgeronde rechthoek: Top of book Afgeronde rechthoek: Managers track Afgeronde rechthoek: Technical track Afgeronde rechthoek: Previous page Afgeronde rechthoek: Home






The groups of pointers to implementations of actions are the interfaces with the environment of the instance. In the COM component model, the navigation between interfaces is implemented using the QueryInterface routine. Each COM interface starts with this method. The COM interfaces have two other routines AddRef and Release. These routines help managing the reference counting of the interfaces. The three interfaces together form a standard part of each COM interface. This part has a special name: ‘IUnknown’. If the QueryInterface routine is used to search for the IUnknown entry point, then always the same entry point is given. It is the main entry point of the instance.



Each interface corresponds with a pointer in the data structure that contains the assets of the instance. The fields that contain the other assets are arranged underneath the interface pointers. The orange arrows represent the internal communication paths that are used when the QueryInterface routine of an interface is accessed. The red arrow represents the communication path when an external client calls a particular method of the second interface. Communication paths always follow existing links. Inside the component models, the links are implemented by pointers.

The design decision to put the management of the reference counts into the hands of the clients of the software components was wrong. After that the COM model became accepted in the software market it became impossible to revert that decision. Microsoft had to wait for .Net to be able to cure that situation. .Net hides its new component model in the .Net language constructs. That component model relays the responsibility for reference counting to the infrastructure that is hidden from the programmers. That decision enables them among other things to support in .Net reliable garbage collection.



Afgeronde rechthoek: Top of page Afgeronde rechthoek: Next page