System.Win.ComServ.TComServer
Delphi
TComServer = class(TComServerObject)
C++
class PASCALIMPLEMENTATION TComServer : public System::Win::Comobj::TComServerObject
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | System.Win.ComServ.pas System.Win.ComServ.hpp |
System.Win.ComServ | System.Win.ComServ |
Description
TComServer is the class type of the ComServ variable that is declared and instantiated in the ComServ unit.
TComServer is the class type used for a COM server, which is a module that contains COM or OLE class definitions. That module can be either an in-process server (DLL) or a local server (EXE).
TComServer properties contain all necessary information about the server, such as its type library, name, Help file, and so on. They also indicate when and how the server should be loaded and unloaded.
TComServer methods are used:
- To access TComServer properties.
- To create associated class factories to instantiate the COM and OLE classes based upon their class identifier (CLSID).
- To update the registry database with information about the COM and OLE classes.
TComServer is the type of the ComServ variable that is automatically instantiated in the ComServ unit. Each module that is created as a server for COM objects has its own instance of ComServ.
To manage its class factories, the ComServer uses a TComClassManager object, which is accessed using the ComClassManager function in the ComObj unit. The class factories are used primarily by calls to TComClassManager methods.
Note: The ComServ unit declares and implements global routines that must be exported by each in-process server. These routines automatically handle the registering, unregistering, and unloading of the COM server.