This section describes how to load Automation and generate any FLI definitions needed to use it.
Before using any of the LispWorks Automation APIs, you need to load the module using:
(require "automation")
Automation components and interfaces that are to be used by the Automation API must be placed in a type library using suitable tools. In some cases, this type library will be supplied as part of the DLL or executable containing the component.
Some of the Automation APIs described in this chapter require you to convert the definitions in the type library into FLI definitions. This is done by compiling and loading a system definition that references the library with the options :type
:midl-type-library-file. The names in the type library are converted to Lisp symbols as specified in 1.3 The mapping from COM names to Lisp symbols.
Note: this is not required by all the APIs, for example see 3.3.2 Calling Automation methods without a type library and 3.4.2 A simple implementation of a single Automation interface.
Suppose you have a defsystem system definition form that references a library: that is, a system member has options :type
:midl-type-library-file as described in 3.1.2 Generating FLI definitions from COM definitions.
For this member, the option :com
can be added to specify whether all the COM functionality is required. The keyword can take these values:
t |
Analyze and generate all the required code for calling and implementing the interfaces from the type library. This is the default value. |
nil |
Analyze but do not generate any code for calling or implementing COM interfaces from the type library. It is still possible to call Automation methods. |
:not-binary |
Using the value nil
or :not-binary
generates much smaller code and is therefore much faster. However, it is never obligatory to use the option :com
.
Use :com nil
when the application calls Automation interfaces from the type library but does not implement any of them or need to call any methods from dual interfaces using call-com-interface.
Use :com
:not-binary
when the application implements only dispinterfaces from the library. This is typically required for implementing sink interfaces for use with connection points.
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41