NextPrevUpTopContentsIndex

query-interface

Function
Summary

Attempts to obtain a COM interface pointer for one interface from another.

Package

com

Signature

query-interface interface-ptr iid &key errorp => interface-for-iid

Arguments

interface-ptr

A COM interface pointer to be queried.

iid

The iid of a COM interface.

errorp

A boolean. The default is t .

Values

interface-for-iid

The new COM interface pointer or nil .

Description

The function query-interface function invokes the COM method IUnknown::QueryInterface to attempt to obtain an interface pointer for the given iid . The iid can be a symbol naming a COM interface or a refguid foreign pointer containing its iid.

If the IUnknown::QueryInterface returns successfully then the new interface pointer interface-for-iid is returned.

If errorp is nil then nil is returned if the interface pointer cannot be found, otherwise an error of type com-error is signalled.

Example
(query-interface p-foo 'i-bar)
See also

refguid
com-error
add-ref
release
with-temp-interface
with-query-interface


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

NextPrevUpTopContentsIndex