Used to simplify invocation of several methods from a particular Automation interface pointer.
The names of the dispatch function and Automation interface.
A symbol which will be defined as a macro, as if by macrolet
. The macro can be used by the forms to invoke the methods on dispinterface-ptr.
A symbol which names the Automation interface. It is not evaluated.
A form which is evaluated to yield a COM i-dispatch
interface pointer.
A form to be evaluated.
When the macro with-dispatch-interface
evaluates the forms, the local macro dispatch-function can be used to invoked the methods for the Automation interface dispinterface-name, which should be the type or a supertype of the actual type of the Automation interface pointer dispinterface-ptr.
The dispatch-function macro has the following signature:
dispatch-function method-name arg* => values
A symbol which names the method. It is not evaluated.
Arguments to the method (see Data conversion when calling Automation methods for details).
Values from the method (see Data conversion when calling Automation methods for details).
For example, in order to invoke the ReFormat
method of a MyDocument
interface pointer
(with-dispatch-interface (call-doc my-document) doc
(call-doc re-format))
LispWorks COM/Automation User Guide and Reference Manual - 14 Feb 2015