All Manuals > LispWorks COM/Automation User Guide and Reference Manual > 1 Using COM


1.9 Calling COM object methods from Lisp

Within the implementation of a COM object, the macros call-com-object and with-com-object can be used to call COM methods directly for a COM object without using an interface pointer. To call a COM method, you need to specify the class name, the method name, the interface name if the method name is not unique, a COM object and suitable arguments. The class name is a symbol as used in the define-com-implementation form and can be a superclass of the actual object class. The method and interface names are given as symbols named as in The mapping from COM names to Lisp symbols. and the arguments and values are as specified below in Data conversion when calling COM object methods. These macros should be used with caution because they assume that the caller knows the implementation's pass-style for all the arguments.

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

1.9.1 Data conversion when calling COM object methods

No explicit argument or return value conversion is done by call-com-object or with-com-object. As a result, every argument must be passed as a positional argument and must be of the type expected by the method's implementation The allowable types are described in the following sections. In parameters

For in parameters, Out parameters

For out parameters, In-out parameters

For in-out parameters,


LispWorks COM/Automation User Guide and Reference Manual - 23 Mar 2017