CAtlComModule Class
This class implements a COM server module.
class CAtlComModule : public _ATL_COM_MODULE
Name | Description |
---|---|
CAtlComModule::CAtlComModule | The constructor. |
CAtlComModule::~CAtlComModule | The destructor. |
Name | Description |
---|---|
CAtlComModule::RegisterServer | Call this method to update the system registry for each object in the object map. |
CAtlComModule::RegisterTypeLib | Call this method to register a type library. |
CAtlComModule::UnregisterServer | Call this method to unregister each object in the object map. |
CAtlComModule::UnRegisterTypeLib | Call this method to unregister a type library. |
CAtlComModule
implements a COM server module, allowing a client to access the module's components.
This class replaces the obsolete CComModule class used in earlier versions of ATL. See ATL Module Classes for more details.
CAtlComModule
Header: atlbase.h
The constructor.
CAtlComModule() throw();
Initializes the module.
The destructor.
~CAtlComModule();
Frees all class factories.
Call this method to update the system registry for each object in the object map.
HRESULT RegisterServer(BOOL bRegTypeLib = FALSE, const CLSID* pCLSID = NULL);
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.
Calls the global function AtlComModuleRegisterServer.
Call this method to register a type library.
HRESULT RegisterTypeLib(LPCTSTR lpszIndex);
HRESULT RegisterTypeLib();
lpszIndex
String in the format "\\N", where N is the integer index of the TYPELIB resource.
Returns S_OK on success, or an error HRESULT on failure.
Adds information about a type library to the system registry. If the module instance contains multiple type libraries, use the first version of this method to specify which type library should be used.
Call this method to unregister each object in the object map.
HRESULT UnregisterServer(
BOOL bRegTypeLib = FALSE,
const CLSID* pCLSID = NULL);
bRegTypeLib
TRUE if the type library is to be unregistered. The default value is FALSE.
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.
Calls the global function AtlComModuleUnregisterServer.
Call this method to unregister a type library.
HRESULT UnRegisterTypeLib(LPCTSTR lpszIndex);
HRESULT UnRegisterTypeLib();
lpszIndex
String in the format "\\N", where N is the integer index of the TYPELIB resource.
Removes information about a type library from the system registry. If the module instance contains multiple type libraries, use the first version of this method to specify which type library should be used.
Returns S_OK on success, or an error HRESULT on failure.