Attempts to obtain a COM interface pointer for one interface from another.
com
query-interface interface-ptr iid &key errorp => interface-for-iid
interface-ptr⇩ |
A COM interface pointer to be queried. |
iid⇩ |
The iid of a COM interface. |
errorp⇩ |
A boolean. The default is t . |
interface-for-iid⇩ |
The new COM interface pointer or nil . |
The function query-interface
function invokes the COM method IUnknown::QueryInterface
to attempt to obtain an interface pointer for iid from interface-ptr.
iid can be a symbol naming a COM interface or a refguid foreign pointer containing its iid.
If IUnknown::QueryInterface
returns successfully then the new interface pointer interface-for-iid is returned.
If errorp is true, then nil
is returned if the interface pointer cannot be found, otherwise an error of type com-error is signaled.
(query-interface p-foo 'i-bar)
refguid
com-error
add-ref
release
with-temp-interface
with-query-interface
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:38