CComModule Class
As of ATL 7.0, CComModule is deprecated: see ATL Module Classes for more details.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
class CComModule : public _ATL_MODULE
Members
Public Methods
Name |
Description |
---|---|
Creates an object of a specified CLSID. For DLLs only. |
|
Returns m_hInst. |
|
Returns m_hInstResource. |
|
Returns m_hInstTypeLib. |
|
Initializes data members. |
|
Enters an object's standard class registration in the system registry. |
|
Registers the class object. For EXEs only. |
|
Updates the system registry for each object in the object map. |
|
Registers a type library. |
|
Revokes the class object. For EXEs only. |
|
Releases data members. |
|
Removes an object's standard class registration from the system registry. |
|
Unregisters each object in the object map. |
|
Registers or unregisters an object's standard class registration. |
|
Runs the script contained in a specified resource to register or unregister an object. |
|
Statically links to the ATL Registry Component. Runs the script contained in a specified resource to register or unregister an object. |
Public Data Members
Name |
Description |
---|---|
Ensures synchronized access to the object map information. |
|
Ensures synchronized access to the type library information. |
|
Ensures synchronized access to window class information and static data used during window creation. |
|
Contains the handle to the module instance. |
|
By default, contains the handle to the module instance. |
|
By default, contains the handle to the module instance. |
|
Points to the object map maintained by the module instance. |
Remarks
Note
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.
Inheritance Hierarchy
CComModule
Requirements
Header: atlbase.h