COM Modules
The following classes provide support for a COM module:
CComModule
Implements a DLL or EXE module.
CComAutoThreadModule
Implements an EXE module, with support for multiple thread-pooled apartments.
ATL Class Overview