CComModule Class
Collapse the table of content
Expand the table of content

CComModule Class

As of ATL 7.0, CComModule is deprecated: see ATL Module Classes for more details.

class CComModule : public _ATL_MODULE


This class is deprecated, and the ATL code generation wizards now use the CAtlAutoThreadModule and CAtlModule derived classes. See ATL Module Classes for more information. The information that follows is for use with applications created with older releases of ATL. CComModule is still part of ATL for backwards capability.

CComModule implements a COM server module, allowing a client to access the module's components. CComModule supports both DLL (in-process) and EXE (local) modules.

A CComModule instance uses an object map to maintain a set of class object definitions. This object map is implemented as an array of _ATL_OBJMAP_ENTRY structures, and contains information for:

  • Entering and removing object descriptions in the system registry.

  • Instantiating objects through a class factory.

  • Establishing communication between a client and the root object in the component.

  • Performing lifetime management of class objects.

When you run the ATL COM AppWizard, the wizard automatically generates _Module, a global instance of CComModule or a class derived from it. For more information about the ATL Project Wizard, see the article Creating an ATL Project.

In addition to CComModule, ATL provides CComAutoThreadModule, which implements an apartment-model module for EXEs and Windows services. Derive your module from CComAutoThreadModule when you want to create objects in multiple apartments.

Header: atlbase.h

Community Additions

© 2015 Microsoft