| description | Learn more about: CAtlModuleT Class | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| title | CAtlModuleT Class | |||||||||
| ms.date | 11/04/2016 | |||||||||
| f1_keywords |
|
|||||||||
| helpviewer_keywords |
|
|||||||||
| ms.assetid | 9b74d02f-9117-47b1-a05e-c5945f83dd2b |
This class implements an ATL module.
template <class T>
class ATL_NO_VTABLE CAtlModuleT : public CAtlModuleT
Your class derived from CAtlModuleT.
| Name | Description |
|---|---|
| CAtlModuleT::CAtlModuleT | The constructor. |
| 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();Calls CAtlModuleT::InitLibId.
Initializes the data member containing the GUID of the current module.
static void InitLibId() throw();Called by the constructor CAtlModuleT::CAtlModuleT.
Adds the EXE to the registry.
HRESULT RegisterAppId() throw();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();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.
Returns S_OK on success, or an error HRESULT on failure.
Removes the EXE from the registry.
HRESULT UnregisterAppId() throw();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();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.
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();bRegister
Reserved.
Returns S_OK on success, or an error HRESULT on failure.