All Manuals > COM/Automation User Guide and Reference Manual > 4 Automation Reference Entries

interface-connect Function

Summary

Connects a sink interface pointer to the source of events in another COM interface pointer.

Package

com

Signature

interface-connect interface-ptr iid sink-ptr &key errorp => cookie

Arguments
interface-ptr
A COM interface pointer that provides the source interface iid.
iid
The iid of the source interface to be connected. The iid can be a symbol naming the interface or a refguid foreign pointer.
sink-ptr
A COM interface that will receive the events for iid.
errorp
A boolean.
Values
cookie
An integer cookie associated with this connection.
Description

The function interface-connect connects the COM interface sink-ptr to the connection point in interface-ptr that is named by iid.

If errorp is false, errors connecting sink-ptr will cause nil to be returned. Otherwise an error of type com-error will be signaled.

Examples

Suppose there is an interface pointer clonable which provides a source interface i-clonable-events, then the following form can be used to connect an implementation of this source interface sink:

(setq cookie
      (interface-connect clonable
                         'i-clonable-events
                         sink))
See also

interface-disconnect
refguid
com-error


COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41