All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

define-ole-control-component Macro

Summary

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

Package

capi

Signature

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

Arguments
class-name
A symbol.
superclass-name
A symbol naming a class.
slots
A list of slot specifiers as in defclass.
class-options
Class options as in defclass, plus specific options (see below).
Description

The macro define-ole-control-component defines an Automation component class class-name (like com:define-automation-component) 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 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.

Notes

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

Examples
(example-edit-file "com/ole/control-implementation/deliver.lisp")
See also

ole-control-component


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:33:57