On this page:
com-events
com-event-type
com-register-event-handler
com-unregister-event-handler

3 COM Events🔗ℹ

COM events are generated by COM objects. Unlike HTML events, there is no fixed set of COM events, though there are “stock” events that many COM objects support. MysterX allows the programmer to write handlers for both stock and custom events.

procedure

(com-events obj/type)  (listof string?)

  obj/type : (or/c com-object? com-type?)
Returns a list of strings naming the events supported by obj/type.

If calling this procedure results in an error indicating that the COM object’s coclass is ambiguous, try using either set-coclass! or set-coclass-from-progid!, then retry com-events.

procedure

(com-event-type obj/type ev)  (listof string?)

  obj/type : (or/c com-object? com-type?)
  ev : string?
Returns the type of an event handler for the event ev generated by the particular COM object/type obj/type. The return type of all COM event handlers is void.

See also com-events for dealing with a COM object that has an ambiguous class.

procedure

(com-register-event-handler obj ev f)  void?

  obj : com-object?
  ev : string?
  f : (any/c . -> . any)
Registers f as event handler for the event ev when generated by obj. The type of argument supplied to f depends on the event; the result of f is always discarded.

See also com-events for dealing with a COM object that has an ambiguous class.

procedure

(com-unregister-event-handler obj ev)  void?

  obj : com-object?
  ev : string?
Unregisters any event handler for the event ev that is generated by the COM object obj.