The names of the dispatch function and object class.
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 object.
A symbol which names the COM implementation class. It is not evaluated.
An optional form which when evaluated should yield a COM interface pointer. This is only needed if the definition of the methods being called have the interface keyword in their class-specs.
A form which is evaluated to yield a COM object.
A form to be evaluated.
When the macro call-com-object
evaluates the forms, the local macro dispatch-function can be used to invoked the methods for the COM class class-name, which should be the type or a supertype of the actual type of object.
The dispatch-function macro has the following signature:
dispatch-function method-spec arg* => values
method-spec ::= method-name | (interface-name method-name)
Specifies the method to be called. It is not evaluated.
A symbol naming the method to call.
A symbol naming the interface of the method to call. This is only required if the implementation class class-name has more than one method with the given method-name.
Arguments to the method (see Data conversion when calling COM object methods for details).
Values from the method (see Data conversion when calling COM object methods for details).
Note that, because with-com-object
requires a COM object, it can only be used by the implementation of that object. All other code should use with-com-interface
with the appropriate COM interface pointer.
(with-com-object (call-my-doc doc-impl) my-doc
(call-my-doc move 0 0)
(call-my-doc resize 100 200))
LispWorks COM/Automation User Guide and Reference Manual - 23 Mar 2017