Klasa CAtlComModuleCAtlComModule Class
Ta klasa implementuje moduł serwera COM.This class implements a COM server module.
SkładniaSyntax
class CAtlComModule : public _ATL_COM_MODULE
Elementy członkowskieMembers
Konstruktory publicznePublic Constructors
NazwaName | OpisDescription |
---|---|
CAtlComModule::CAtlComModuleCAtlComModule::CAtlComModule | Konstruktor.The constructor. |
CAtlComModule:: ~ CAtlComModuleCAtlComModule::~CAtlComModule | Destruktor.The destructor. |
Metody publicznePublic Methods
NazwaName | OpisDescription |
---|---|
CAtlComModule::RegisterServerCAtlComModule::RegisterServer | Wywołaj tę metodę, aby zaktualizować rejestr systemu dla każdego obiektu na mapie obiektów.Call this method to update the system registry for each object in the object map. |
CAtlComModule::RegisterTypeLibCAtlComModule::RegisterTypeLib | Wywołaj tę metodę, aby zarejestrować bibliotekę typów.Call this method to register a type library. |
CAtlComModule::UnregisterServerCAtlComModule::UnregisterServer | Wywołaj tę metodę, aby wyrejestrować każdy obiekt na mapie obiektu.Call this method to unregister each object in the object map. |
CAtlComModule::UnRegisterTypeLibCAtlComModule::UnRegisterTypeLib | Wywołaj tę metodę, aby wyrejestrować bibliotekę typów.Call this method to unregister a type library. |
UwagiRemarks
CAtlComModule
implementuje moduł serwera COM, umożliwiając klientowi dostęp do składników modułu.CAtlComModule
implements a COM server module, allowing a client to access the module's components.
Ta klasa zastępuje przestarzałą klasę CComModule używaną we wcześniejszych wersjach ATL.This class replaces the obsolete CComModule class used in earlier versions of ATL. Zobacz klasy modułów ATL , aby uzyskać więcej szczegółów.See ATL Module Classes for more details.
Hierarchia dziedziczeniaInheritance Hierarchy
_ATL_COM_MODULE_ATL_COM_MODULE
CAtlComModule
WymaganiaRequirements
Nagłówek: atlbase. hHeader: atlbase.h
CAtlComModule::CAtlComModuleCAtlComModule::CAtlComModule
Konstruktor.The constructor.
CAtlComModule() throw();
UwagiRemarks
Inicjuje moduł.Initializes the module.
CAtlComModule:: ~ CAtlComModuleCAtlComModule::~CAtlComModule
Destruktor.The destructor.
~CAtlComModule();
UwagiRemarks
Zwalnia wszystkie fabryki klas.Frees all class factories.
CAtlComModule::RegisterServerCAtlComModule::RegisterServer
Wywołaj tę metodę, aby zaktualizować rejestr systemu dla każdego obiektu na mapie obiektów.Call this method to update the system registry for each object in the object map.
HRESULT RegisterServer(BOOL bRegTypeLib = FALSE, const CLSID* pCLSID = NULL);
ParametryParameters
bRegTypeLibbRegTypeLib
Ma wartość TRUE, jeśli biblioteka typów ma zostać zarejestrowana.TRUE if the type library is to be registered. Wartość domyślna to FALSE.The default value is FALSE.
pCLSIDpCLSID
Wskazuje identyfikator CLSID obiektu, który ma zostać zarejestrowany.Points to the CLSID of the object to be registered. W przypadku wartości NULL (wartość domyślna) wszystkie obiekty w mapie obiektów zostaną zarejestrowane.If NULL (the default value), all objects in the object map will be registered.
Wartość zwracanaReturn Value
Zwraca S_OK po powodzeniu lub błąd HRESULT w przypadku niepowodzenia.Returns S_OK on success, or an error HRESULT on failure.
UwagiRemarks
Wywołuje funkcję globalną AtlComModuleRegisterServer.Calls the global function AtlComModuleRegisterServer.
CAtlComModule::RegisterTypeLibCAtlComModule::RegisterTypeLib
Wywołaj tę metodę, aby zarejestrować bibliotekę typów.Call this method to register a type library.
HRESULT RegisterTypeLib(LPCTSTR lpszIndex);
HRESULT RegisterTypeLib();
ParametryParameters
lpszIndexlpszIndex
Ciąg w formacie " \ \n", gdzie N jest indeksem liczb całkowitych zasobu biblioteki typów.String in the format "\\N", where N is the integer index of the TYPELIB resource.
Wartość zwracanaReturn Value
Zwraca S_OK po powodzeniu lub błąd HRESULT w przypadku niepowodzenia.Returns S_OK on success, or an error HRESULT on failure.
UwagiRemarks
Dodaje informacje o bibliotece typów do rejestru systemowego.Adds information about a type library to the system registry. Jeśli wystąpienie modułu zawiera wiele bibliotek typów, użyj pierwszej wersji tej metody, aby określić, która biblioteka typów powinna być używana.If the module instance contains multiple type libraries, use the first version of this method to specify which type library should be used.
CAtlComModule::UnregisterServerCAtlComModule::UnregisterServer
Wywołaj tę metodę, aby wyrejestrować każdy obiekt na mapie obiektu.Call this method to unregister each object in the object map.
HRESULT UnregisterServer(
BOOL bRegTypeLib = FALSE,
const CLSID* pCLSID = NULL);
ParametryParameters
bRegTypeLibbRegTypeLib
Ma wartość TRUE, jeśli biblioteka typów ma być wyrejestrowana.TRUE if the type library is to be unregistered. Wartość domyślna to FALSE.The default value is FALSE.
pCLSIDpCLSID
Wskazuje identyfikator CLSID obiektu, który ma zostać wyrejestrowany.Points to the CLSID of the object to be unregistered. W przypadku wartości NULL (wartość domyślna) wszystkie obiekty w mapie obiektów zostaną wyrejestrowane.If NULL (the default value), all objects in the object map will be unregistered.
Wartość zwracanaReturn Value
Zwraca S_OK po powodzeniu lub błąd HRESULT w przypadku niepowodzenia.Returns S_OK on success, or an error HRESULT on failure.
UwagiRemarks
Wywołuje funkcję globalną AtlComModuleUnregisterServer.Calls the global function AtlComModuleUnregisterServer.
CAtlComModule::UnRegisterTypeLibCAtlComModule::UnRegisterTypeLib
Wywołaj tę metodę, aby wyrejestrować bibliotekę typów.Call this method to unregister a type library.
HRESULT UnRegisterTypeLib(LPCTSTR lpszIndex);
HRESULT UnRegisterTypeLib();
ParametryParameters
lpszIndexlpszIndex
Ciąg w formacie " \ \n", gdzie N jest indeksem liczb całkowitych zasobu biblioteki typów.String in the format "\\N", where N is the integer index of the TYPELIB resource.
UwagiRemarks
Usuwa informacje o bibliotece typów z rejestru systemowego.Removes information about a type library from the system registry. Jeśli wystąpienie modułu zawiera wiele bibliotek typów, użyj pierwszej wersji tej metody, aby określić, która biblioteka typów powinna być używana.If the module instance contains multiple type libraries, use the first version of this method to specify which type library should be used.
Wartość zwracanaReturn Value
Zwraca S_OK po powodzeniu lub błąd HRESULT w przypadku niepowodzenia.Returns S_OK on success, or an error HRESULT on failure.