From RAD Studio API Documentation
Jump to: navigation, search



TOleServer = class(TComponent, IUnknown)


class PASCALIMPLEMENTATION TOleServer : public System::Classes::TComponent


Type Visibility Source Unit Parent
class public
Vcl.OleServer Vcl.OleServer


TOleServer is the base class for components that represent an imported COM server.

TOleServer is the base class for COM servers that are imported by choosing Component | Import Component from the IDE. TOleServer introduces several properties and methods that manage the connection to a COM server and for invoking its default events.

Descendants of TOleServer expose the properties, methods, and events of the server CoClass. When an application calls one of the TOleServer descendant's methods or sets one of its properties, the component automatically establishes a connection to the COM server. You can also connect explicitly by calling the Connect method.

Do not create instances of TOleServer. TOleServer relies on abstract pure virtual methods to establish and break a connection to the COM server. Instead, use a descendant of TOleServer that wraps the desired server. Numerous TOleServer descendants are provided on the Servers tab of the Component Palette. In addition, you can create your own descendants by importing a server's type library.

See Also