NextPrevUpTopContentsIndex

call-dispatch-put-property

Macro
Summary

Calls an Automation property setter method from a particular interface.

Package

com

Signature

call-dispatch-put-property spec arg * => values

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

Arguments

spec

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

dispinterface-ptr

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

dispinterface-name

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

method-name

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

arg

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

Values

values

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

Description

The call-dispatch-put-property macro is used to invoke an Automation property setter method from Lisp. The dispatch-ptr should be a COM interface pointer for the i-dispatch interface. The appropriate Automation property setter method, chosen using dispinterface-name and method-name , is invoked after evaluating each arg. The arg s must be values that are suitable for the method and of types compatible with Automation. The values returned are as specified by the method signature. In general, property setter methods take one argument (the new value) and return the no values, but see Data conversion when calling Automation methods for more details.

There is also setf expander for call-dispatch-get-property, which can be used as an alternative to the call-dispatch-put-property macro.

Example

For example, in order to set the Width property of a MyDocument interface pointer

(call-dispatch-put-property
   (doc my-document width)
   10)
See also

call-dispatch-get-property
call-dispatch-method


LispWorks COM/Automation User Guide and Reference Manual - 21 Feb 2008

NextPrevUpTopContentsIndex