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

get-active-object Function

Summary

Looks for a registered running instance of a coclass.

Package

com

Signature

get-active-object &key clsid progid riid errorp => interface-ptr

Arguments
clsid
A string or a refguid giving a CLSID to create.
progid
A string giving a ProgID to create.
riid
An optional refiid giving the COM interface name to return.
errorp
A boolean. The default is t.
Values
interface-ptr
A COM interface pointer for riid.
Description

The function get-active-object looks for a registered running instance of a coclass in the system Running Object Table and returns its riid interface pointer if any. If riid is nil, then i-unknown is used.

The coclass can be specified directly by supplying clsid or indirectly by supplying progid, which will locate the CLSID from the registry.

If errorp is true, then an error is signaled if no instances are running. Otherwise nil is returned if no instances are running.

Examples
(get-active-object :progid "Excel.Application"
                   :riid 'i-dispatch)
See also

get-object


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