Invokes a method from a particular COM interface.
com
call-com-interface spec {arg}* => value*
spec ::= (interface-ptr interface-name method-name)
spec |
The interface pointer and a specification of the method to be called. |
arg⇩ |
Arguments to the method (see 1.8.1 Data conversion when calling COM methods for details). |
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. |
value*⇩ |
Values from the method (see 1.8.1 Data conversion when calling COM methods for details). |
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. args and value* are described in detail in 1.8.1 Data conversion when calling COM methods.
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))
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:38