Next Previous Up Top Contents Index

4.12 The OLE-AUTOMATION module

<class-factory>

Open concrete primary class

Summary

This class implements the COM IClassFactory interface. Making an instance of it causes it to be registered with the system automatically, for use by potential clients.

Superclasses

<LPUNKNOWN> 

Init-keywords

clsid:
The COM Class ID that identifies the object the server provides. Required. This ID can be represented either as a string of 32 hexadecimal digits in the following format

"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"

That is, where each x is a hexadecimal digit. For example:

"{e90f09e0-43db-11d0-8a04-02070119f639}"

Alternatively, the ID can be a <REFCLSID>, as returned from make-GUID.

You can get the ID value by generating a GUID with Functional Developer's create-id utility. See "Creating GUID numbers" on page 129.

class:
The Dylan class (usually a user-defined subclass of <simple-dispatch>) that is to be instantiated when the client (controller) requests it. Required.

args:
Optional sequence of initialization arguments to be passed to make when instantiating the object. The default is to pass the same arguments as for the <class-factory> (<simple-dispatch> accepts and ignores those that are only for the factory, and <class-factory> ignores any that it does not recognize.) Note that <simple-dispatch> requires typeinfo: to be supplied.

server-module-handle:

Contains the <hModule> instance of the server DLL when invoked from an in-process server. This argument is not normally specified by the user, but is passed in automatically when the class factory is created from the in-process DLL entry-point. Note that if you do not specify an explicit args argument, then this argument will be passed into your object along with all the other initialization arguments.

server-context:

Indicates where the server is running. See the description of create-dispatch below for a list of possible values. Defaults to $CLSCTX-LOCAL-SERVER. You can use $CLSCTX-INPROC-SERVER instead to suppress external registration of the factory.

connection-flags:

Optional connection flags, controlling whether more than one client is allowed to invoke the same class factory (and hence use the same server process). The value is one of the following OLE constants:

$REGCLS-SINGLEUSE - Only one connection allowed. This is the default value.

$REGCLS-MULTIPLEUSE - Multiple connections allowed.

$REGCLS-MULTI-SEPARATE - Multiple connections allowed, separate control.

For further explanation of these constants, see the Microsoft OLE API documentation for the function CoClassRegisterClassObject.

Description

This class implements the COM IClassFactory interface. Making an instance of it causes it to be registered with the system automatically, for use by potential clients.

An Automation server application does not need to use the instance directly, except that it must call the function revoke-registration on the instance before terminating.

Any keyword arguments other than those documented above are passed in the make call when the Dylan class is instantiated. Note that <simple-dispatch> requires you to supply typeinfo:.


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

Next Previous Up Top Contents Index