NextPrevUpTopContentsIndex

create-instance-with-events

Function
Summary

A convenience function which combines create-instance and set-i-dispatch-event-handler.

Package

com

Signature

create-instance-with-events clsid event-handler &rest args &key event-object => interface , list

Arguments

clsid

A string or a refguid giving a CLSID to create.

event-handler

A function of four arguments.

event-object

A Lisp object.

Values

interface

An i-dispatch interface.

sinks

A list of objects representing the connections made.

Description

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 except the event-object. It 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.

Examples

See examples/com/automation/events/ie-events.lisp

See also

create-instance
set-i-dispatch-event-handler


LispWorks COM/Automation User Guide and Reference Manual - 17 Jul 2006

NextPrevUpTopContentsIndex