System.Win.ComObj.TComObjectFactory.ComServer

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ComServer: TComServerObject read FComServer;

C++

__property TComServerObject* ComServer = {read=FComServer};

Properties

Type Visibility Source Unit Parent
property public
System.Win.ComObj.pas
System.Win.ComObj.hpp
System.Win.ComObj TComObjectFactory

Description

Specifies the COM server that owns the class factory.

ComServer indicates the COM server that contains the class factory object. It is used by the class manager methods to process actions on specific factories based upon which server owns them.

The class manager's ForEachFactory is a general purpose method that uses ComServer to check the server ComServer of each factory in the class manager's factory list. ForEachFactory then calls the factory procedure passed as a parameter to it, for each of the factories of that particular COM server.

ComServer is also used in the COM class's CreateFromFactory constructor to call the COM server's CountObject method. This increments the object count on the server when the class factory instantiates its class type.

ComServer is initialized, in the class factory constructor, to the server that is passed to its constructor.

See Also