A convenience function which combines create-instance and set-i-dispatch-event-handler.
com
create-instance-with-events clsid event-handler &rest args &key event-object => interface, sinks
clsid⇩ |
A string or a refguid giving a CLSID to create. |
event-handler⇩ |
A function of four arguments. |
args⇩ |
Lisp objects. |
event-object⇩ |
A Lisp object. |
interface⇩ |
An i-dispatch interface. |
sinks⇩ |
A list of objects representing the connections made. |
The function create-instance-with-events
is a convenience function which starts an i-dispatch
interface and sets an event handler.
It first calls create-instance with clsid and all the keyword arguments in args except :event-object
. clsid defaults the create-instance argument riid to the value i-dispatch
.
It then calls set-i-dispatch-event-handler on the resulting interface, passing event-handler, event-object and clsid (as the coclass).
interface is the interface started, and sinks is the result of set-i-dispatch-event-handler.
(example-edit-file "com/automation/events/ie-events")
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41