Export (0) Print
Expand All

CComModule Class 

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


class CComModule : public _ATL_MODULE

NoteNote

This class is obsolete, 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 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

ADD
Show:
© 2014 Microsoft