CAtlModuleT Class
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at CAtlModuleT Class.
This class implements an ATL module.
template <class T> class ATL_NO_VTABLE CAtlModuleT : public CAtlModule
Parameters
T
Your class derived from CAtlModuleT.
Public Constructors
| Name | Description |
|---|---|
| CAtlModuleT::CAtlModuleT | The constructor. |
Public Methods
| Name | Description |
|---|---|
| CAtlModuleT::InitLibId | Initializes the data member containing the GUID of the current module. |
| CAtlModuleT::RegisterAppId | Adds the EXE to the registry. |
| CAtlModuleT::RegisterServer | Adds the service to the registry. |
| CAtlModuleT::UnregisterAppId | Removes the EXE from the registry. |
| CAtlModuleT::UnregisterServer | Removes the service from the registry. |
| CAtlModuleT::UpdateRegistryAppId | Updates the EXE information in the registry. |
CAtlModuleT, derived from CAtlModule, implements an Executable (EXE) or a Service (EXE) ATL module. An Executable module is a local, out-of-process server, whereas a Service module is a Windows application that runs in the background when Windows starts.
CAtlModuleT provides support for initializing, registering, and unregistering of the module.
CAtlModuleT
Header: atlbase.h
The constructor.
CAtlModuleT() throw();
Remarks
Calls CAtlModuleT::InitLibId.
Initializes the data member containing the GUID of the current module.
static void InitLibId() throw();
Remarks
Called by the constructor CAtlModuleT::CAtlModuleT.
Adds the EXE to the registry.
HRESULT RegisterAppId() throw();
Return Value
Returns S_OK on success, or an error HRESULT on failure.
Adds the service to the registry.
HRESULT RegisterServer(
BOOL bRegTypeLib = FALSE,
const CLSID* pCLSID = NULL) throw();
Parameters
bRegTypeLib
TRUE if the type library is to be registered. The default value is FALSE.
pCLSID
Points to the CLSID of the object to be registered. If NULL (the default value), all objects in the object map will be registered.
Return Value
Returns S_OK on success, or an error HRESULT on failure.
Removes the EXE from the registry.
HRESULT UnregisterAppId() throw();
Return Value
Returns S_OK on success, or an error HRESULT on failure.
Removes the service from the registry.
HRESULT UnregisterServer(
BOOL bUnRegTypeLib,
const CLSID* pCLSID = NULL) throw();
Parameters
bUnRegTypeLib
TRUE if the type library is also to be unregistered.
pCLSID
Points to the CLSID of the object to be unregistered. If NULL (the default value), all objects in the object map will be unregistered.
Return Value
Returns S_OK on success, or an error HRESULT on failure.
Updates the EXE information in the registry.
static HRESULT WINAPI UpdateRegistryAppId(BOOL /* bRegister*/) throw();
Parameters
bRegister
Reserved.
Return Value
Returns S_OK on success, or an error HRESULT on failure.