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

NextPrevUpTopContentsIndex

call-com-object

Macro
Summary

Invokes a COM method on a COM object.

Package

com

Signature

call-com-object spec arg* => values

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.

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.

method-name

A symbol naming the method to call.

interface-name

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.

interface

An optional form which when evaluated should yield a COM interface pointer. This is only needed if the definition of the method being called has the interface keyword in its class-spec.

arg

Arguments to the method (see Data conversion when calling COM object methods for details).

Values

values

Values from the method (see 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. The args and values are described in detail in Data conversion when calling COM object methods.

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


LispWorks COM/Automation User Guide and Reference Manual - 14 Feb 2015

NextPrevUpTopContentsIndex