CAtlModuleT Class

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see CAtlModuleT Class on docs.microsoft.com. 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

NameDescription
CAtlModuleT::CAtlModuleTThe constructor.

Public Methods

NameDescription
CAtlModuleT::InitLibIdInitializes the data member containing the GUID of the current module.
CAtlModuleT::RegisterAppIdAdds the EXE to the registry.
CAtlModuleT::RegisterServerAdds the service to the registry.
CAtlModuleT::UnregisterAppIdRemoves the EXE from the registry.
CAtlModuleT::UnregisterServerRemoves the service from the registry.
CAtlModuleT::UpdateRegistryAppIdUpdates 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.

_ATL_MODULE

CAtlModule

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.

CAtlModule Class
Class Overview
Module Classes

Show: