All Manuals > LispWorks COM/Automation User Guide and Reference Manual > 4 Automation Reference Entries

NextPrevUpTopContentsIndex

invoke-dispatch-put-property

Function
Summary

Call a dispatch property setter method from an interface pointer.

Package

com

Signature

invoke-dispatch-put-property dispinterface-ptr name &rest args => values

Arguments

dispinterface-ptr

An Automation interface pointer.

name

A string or integer.

args

Arguments passed to the method.

Values

values

Values returned by the method.

Description

The function invoke-dispatch-put-property is used to invoke an Automation property setter method from Lisp without needing to compile a type library as part of the application. This is similar to using

Dim var as Object
var.Prop = 2

in Microsoft Visual Basic and contrasts with the macro call-dispatch-put-property which requires a type library to be compiled.

The dispinterface-ptr should be a COM interface pointer for the i-dispatch interface. The appropriate Automation method, chosen using name , which is either a string naming the method or the integer id of the method. The args are converted to Automation values and are passed as the method's in and in-out parameters in the order in which they appear. The new value of the property should be the last argument. The values returned consist of the primary value of the method (if not void) and the values of any out or in-out parameters. See Data conversion when calling Automation methods for more details.

Example

For example, in order to set the Width property of an interface pointer in the variable doc :

(invoke-dispatch-put-property doc "Width" 10)
See also

invoke-dispatch-method
invoke-dispatch-get-property
call-dispatch-put-property


LispWorks COM/Automation User Guide and Reference Manual - 19 Dec 2011

NextPrevUpTopContentsIndex