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

NextPrevUpTopContentsIndex

query-simple-i-dispatch-interface

Function
Summary

Queries the interface pointer from a simple-i-dispatch object using the type information from another interface.

Package

com

Signature

query-simple-i-dispatch-interface this &key related-dispatch => interface-ptr, refguid

Arguments

this

A simple-i-dispatch object.

related-dispatch

An i-dispatch interface pointer.

Values

interface-ptr

An interface pointer.

refguid

A refguid.

Description

The function query-simple-i-dispatch-interface is used to obtain an interface pointer from a simple-i-dispatch interface. The simple-i-dispatch contains the interface name provided using its :interface-name initarg, but it does not have the details of this interface, so query-simple-i-dispatch-interface must be able to find the details.

In the current implementation, the only way for the details to be found is by passing the related-dispatch argument. This should be an interface pointer from which type information about the interface name can be obtained.

The query-simple-i-dispatch-interface function returns two values, interface-ptr which is an interface pointer for the interface-name contained in this and refguid, which is the refguid of that interface-name.

A typical use of query-simple-i-dispatch-interface is to implement a sink interface for events from some other component. The interface pointer for that component is passed as the related-dispatch because that connects to the type library containing both interface definitions.

Before using query-simple-i-dispatch-interface directly, consider the functions set-i-dispatch-event-handler and create-instance-with-events, which provide an succinct way to provide an event callback.

See also

simple-i-dispatch
create-instance-with-events
set-i-dispatch-event-handler


LispWorks COM/Automation User Guide and Reference Manual - 23 Mar 2017

NextPrevUpTopContentsIndex