All Manuals > COM/Automation User Guide and Reference Manual > 2 COM Reference Entries

call-com-object Macro

Summary

Invokes a COM method on a COM object.

Package

com

Signature

call-com-object spec {arg}* => value*

spec ::= (object class-name method-spec &key interface)

method-spec ::= method-name | (interface-name method-name)

Arguments
spec
The object and a specification of the method to be called.
arg
Arguments to the method (see 1.10.1 Data conversion when calling COM object methods for details).
object
A form which is evaluated to yield a COM object.
class-name
A symbol which names the COM implementation class. It is not evaluated.
method-spec
Specifies the method to be called. It is not evaluated.
interface
A form.
method-name
A symbol naming the method to call.
interface-name
A symbol.
Values
value*
Values from the method (see 1.10.1 Data conversion when calling COM object methods for details).
Description

The macro call-com-object invokes the method method-name for the COM class class-name, which should the type or a supertype of the actual type of object. args and value* are described in detail in 1.10.1 Data conversion when calling COM object methods.

If method-spec contains an interface-name, then it should name 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.

If interface is supplied, it should be a form that, when evaluated, yields a COM interface pointer. This is only needed if the definition of the method being called has the :interface keyword in its class-spec.

Note that, because this macro requires a COM object, it can only be used by the implementation of that object. All other code should use call-com-interface with the appropriate COM interface pointer.

Examples
(call-com-object (my-doc doc-impl move) 0 0)
(call-com-object (my-doc doc-impl resize) 100 200)
See also

with-com-object
query-object-interface
call-com-interface


COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:38