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

NextPrevUpTopContentsIndex

call-com-interface

Macro
Summary

Invokes a method from a particular COM interface.

Package

com

Signature

call-com-interface spec arg * => values

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

Arguments

spec

The interface pointer and a specification of the method to be called.

interface-ptr

A form which is evaluated to yield a COM interface pointer.

interface-name

A symbol which names the com interface. It is not evaluated.

method-name

A symbol which names the method. It is not evaluated.

arg

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

Values

values

Values from the method (see Data conversion when calling COM methods for details).

Description

The macro call-com-interface invokes the method method-name for the COM interface interface-name , which should the type or a supertype of the actual type of interface-ptr . The arg s and values are described in detail in Data conversion when calling COM methods.

Example

This example invokes the COM method GetTypeInfo in the interface IDispatch .

(defun get-type-info (disp tinfo &key
                      (locale LOCALE_SYSTEM_DEFAULT))
  (multiple-value-bind (hres typeinfo)
      (call-com-interface
          (disp i-dispatch get-type-info)
          tinfo locale)
    (check-hresult hres 'get-type-info)
    typeinfo))
See also

with-com-interface
query-interface
add-ref
release


LispWorks COM/Automation User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex