The names of the dispatch function and interface.
A symbol which will be defined as a local macro, as if by
macrolet
. The macro can be used by the
form
s to invoke the methods on
interface-ptr
.
A symbol which names the COM interface. It is not evaluated.
A form which is evaluated to yield a COM interface pointer that implements interface-name .
A form to be evaluated.
When the macro
with-com-interface
evaluates the
form
s, the local macro
dispatch-function
can be used to invoked the methods for the COM interface
interface-name
, which should be the type or a supertype of the actual type of
interface-ptr
.
The dispatch-function macro has the following signature:
dispatch-function method-name arg * => values
A symbol which names the method. It is not evaluated.
Arguments to the method (see Data conversion when calling COM methods for details).
Values from the method (see Data conversion when calling COM methods for details).
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)
(with-com-interface (call-disp i-dispatch) disp
(call-disp get-type-info tinfo locale))
(check-hresult hres 'get-type-info)
typeinfo))