All Manuals > CAPI Reference Manual > 1 CAPI Reference Entries




Defines a class that implements the OLE Control protocol for a CAPI pane.




define-ole-control-component class-name ( superclass-name *) slots &rest class-options


The macro define-ole-control-component defines an Automation component class class-name that also implements the OLE Control protocols and other named interfaces or a coclass. This allows a CAPI pane to be embedded in an OLE Control container implemented outside LispWorks.

Each superclass-name argument specifies a direct superclass of the new class, which can be any standard-class provided that certain standard classes are included somewhere in the overall class precedence list. These standard classes depend on the other options and provide the default superclass list if none is specified. The following standard classes are available:

ole-control-component is always needed and provides an implementation of the OLE Control protocol.

com:standard-i-dispatch is always needed and provides a complete implementation of the i-dispatch interface, based on the type information in a type library.

com:standard-i-connection-point-container is needed if there are any source interfaces specified (via the :coclass or :source-interfaces options). This provides a complete implementation of the Connection Point protocols, used to support events.

slots is a list of standard defclass slot definitions.

class-options are standard defclass options. In addition the following options are recognized:

(: coclass coclass-name ) (: interfaces interface-name *) (: source-interfaces interface-name *)

See com:define-automation-component in the LispWorks COM/Automation User Guide and Reference Manual for details of these options.

Typically the :pane-function and :create-callback initargs are supplied using the :default-initarg option.

Implementations of the methods in the :coclass and :interfaces options should be defined using com:define-com-method , com:define-dispinterface-method or com:com-object-dispinterface-invoke .


define-ole-control-component is implemented only in LispWorks for Windows. Load the functionality by (require "embed") .

See also


CAPI Reference Manual - 15 Dec 2011