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

com-object-query-interface Generic Function

Summary

Called by the built in implementation of query-interface.

Package

com

Signature

com-object-query-interface object iid => interface-for-iid, skip-add-ref-p

Method signatures

com-object-query-interface (object standard-i-unknown) (iid t)

Arguments
object
A COM object.
iid
A GUID foreign pointer.
Values
interface-for-iid
The new interface pointer or nil if none.
skip-add-ref-p
A boolean.
Description

The generic function com-object-query-interface is called by the built-in implementation of query-interface for the class standard-i-unknown.

iid is the GUID of the interface to return.

If skip-add-ref-p is nil then query-interface will invoke the COM method IUnknown::AddRef on interface-for-iid before returning it.

The built-in primary method specializing on standard-i-unknown handles the i-unknown interface and all the interfaces specified by the define-com-implementation form for the class of object.

In most cases, there is no need to specialize this generic function for user-defined classes.

You should not call com-object-query-interface directly.

See also

define-com-implementation
standard-i-unknown


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