Next Previous Up Top Contents Index

4.3 Overview of OLE Automation

4.3.4 Class factories

When a server starts running, it does not typically create an instance of the COM class it was asked for straight away. Instead, it first creates a class factory.

A class factory can create multiple objects of a single COM class. Class factories are COM objects that support the interface IClassFactory or IClassFactory2.

The OLE-Automation library provides the class <class-factory>, page 199. When you create an instance of this class, a COM class factory object is created and registered with Windows. Once you have finished with the class factory (such as when the server is about to terminate) you must end this registration with the function revoke-registration, page 227.

Once the server's class factory is running, the controller connects to the class factory and directs it to make an instance of the desired COM object.


OLE, COM, ActiveX and DBMS Reference - 31 MAR 2000

Next Previous Up Top Contents Index