[[Property:title|Coclass]] [[Property:weight|3]] [[Property:uuid|7f91f9ce-e042-1d48-9d01-f9b794269ec4]] We saw earlier that [[COM Interfaces]] can be perceived as views of a component. This conceptual representation actually maps the implementation of an EiffelCOM component. This is because the coclass inherits from the interfaces and implements their [[uuid:b8c10baa-4f50-adfe-a6f8-9cb56a8f1917#Deferred feature|deferred features]]. Indeed, interfaces are [[uuid:b8c10baa-4f50-adfe-a6f8-9cb56a8f1917#Deferred class|deferred classes]] with all features deferred that are accessible by [[uuid:b8c10baa-4f50-adfe-a6f8-9cb56a8f1917#Client|clients]]. The coclass is an Eiffel class that inherits from these interfaces and implements all the features. This design is not specific to Eiffel though, and can be found in other languages as well. The coclass defines the behavior of the interface functions.
==Class Object== Also, we have seen that interfaces are accessed through interface pointers. But how does a client obtain one of these? The answer lies in the class object. The name of this module should really be coclass factory since its goal is to spawn instances of the coclass on request. Class objects are accessed by COM whenever a client requests a new instance of the associated component. COM loads the class object and asks it to provide the interface pointer requested by the client. The way a class object is loaded in memory (this process is called activation) depends on the location of the component (See [[The Component Location|Location]] for a description of the possible locations of a component). If the component is an in-process server, then the class object is called directly through the functions exported from the DLL. If the component is an out-of-process server, then it provides COM with a pointer to the class object. In both cases, once the component is loaded, COM has access to the class object and can call it, should a client request a new instance of a component. [[Image:com-1|Component Creation]] The code for the class object is generated by the EiffelCOM wizard so that Eiffel programmers will not have to worry about it. {{seealso| [[EiffelCOM Wizard|EiffelCOM wizard]]
[[EiffelCOM Library|EiffelCOM library]]
[[EiffelCOM: Introduction|Introduction]]
[[COM Concepts|COM Concepts]]
[[COM Interfaces|COM Interfaces]]
[[The Component Location|Component Location]]
[[Access Type|Access Type]]
[[Deeper into COM|Deeper into COM]] }}