Call a dispatch property getter method from an interface pointer.
com
invoke-dispatch-get-property dispinterface-ptr name &rest args => value*
dispinterface-ptr⇩ |
An Automation interface pointer. |
name⇩ |
A string or integer. |
args⇩ |
Arguments passed to the method. |
value*⇩ |
Values returned by the method. |
The function invoke-dispatch-get-property
is used to invoke an Automation property getter method from Lisp without needing to compile a type library as part of the application. This is similar to using:
Dim var as Object Print #output, var.Prop
in Microsoft Visual Basic and contrasts with the macro call-dispatch-get-property which requires a type library to be compiled.
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.
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 returned values in value* consist of the primary value of the method (if not void) and the values of any out or in-out parameters. See 3.3.3 Data conversion when calling Automation methods for more details.
There is also setf expander for invoke-dispatch-get-property
, which can be used as an alternative to the call-dispatch-put-property macro.
For example, in order to get and set the Width
property of an interface pointer in the variable doc
:
(invoke-dispatch-get-property doc "Width") (setf (invoke-dispatch-get-property doc "Width") 10)
invoke-dispatch-method
invoke-dispatch-put-property
call-dispatch-get-property
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41