A generic function that can be implemented to modify the first argument to the invoke-callback in simple-i-dispatch.
com
simple-i-dispatch-callback-object this => object
simple-i-dispatch-callback-object (this simple-i-dispatch)
this⇩ |
An object of type simple-i-dispatch. |
object |
The callback object to be pass as the first argument to the invoke-callback of this. |
The generic function simple-i-dispatch-callback-object
is called by the implementation of simple-i-dispatch to obtain the callback object (first argument) to the invoke-callback of this. This allows the object to be computed in some way by subclassing simple-i-dispatch and implementing a method on simple-i-dispatch-callback-object
specialized for the subclass.
The pre-defined primary method specializing on simple-i-dispatch always returns its argument.
When the function my-dispatch-callback
below is called, its first argument will be the useful-object passed to make-my-dispatch
.
(defclass my-dispatch (simple-i-dispatch) ((useful-object :initarg :useful-object))) (defmethod simple-i-dispatch-callback-object ((this my-dispatch)) (slot-value this 'useful-object)) (defun make-my-dispatch (useful-object) (make-instance 'my-dispatch :useful-object useful-object :invoke-callback 'my-dispatch-callback :interface-name "MyDispatchInterface"))
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41