Summary


The object map is the primary data table that the CAtlModule-derived _AtlModule object uses to register and unregister the classes in the server. CAtlModule provides numerous helper methods you can use to register and unregister your server, the classes in the server, and the component categories in the classes.

An ATL server creates a class factory for a class, as needed, using the class-creator function entry in the object map. This class factory then creates instances of the class using the instance-creator function entry in the object map. Typically, you inherit a default specification for the implementation of these two creator classes when you derive your class from CComCoClass. However, with the appropriate macro entries in your class, you can override these defaults and provide a custom class factory and custom instance creator function.

CComCoClass has some useful utility functions for reporting rich errors to a client using the COM ErrorInfo protocol. The class also has convenient instantiation methods that create an instance and query for the proper interface based on the type of the provided interface pointer variable.




ATL Internals. Working with ATL 8
ATL Internals: Working with ATL 8 (2nd Edition)
ISBN: 0321159624
EAN: 2147483647
Year: 2004
Pages: 172

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net