NextPrevUpTopContentsIndex

3.3.1 Calling Automation methods using a type library

To use this approach, you must have the type library available at compile-time (see Generating FLI definitions from COM definitions). Information from the type library is built into your application, which makes method calling more efficient. However, it also makes it less dynamic, because the library at the time the application is run must match.

There are three kinds of Automation method, each of which is called using macros designed for the purpose.

To use these macros, you need to specify the interface name, the method name, a COM interface pointer for the i-dispatch interface and suitable arguments. The interface and method names are given as symbols named as in The mapping from COM names to Lisp symbols and the COM interface pointer is a foreign pointer of type com-interface. In all the macros, the arg s and value s are as specified in the Data conversion when calling Automation methods.

The with-dispatch-interface macro is useful when several methods are being called with the same COM interface pointer, because it establishes a local macro that takes just the method name and arguments.


LispWorks COM/Automation User Guide and Reference Manual - 21 Feb 2008

NextPrevUpTopContentsIndex