Looks for a registered running instance of a coclass.
com
get-active-object &key clsid progid riid errorp => interface-ptr
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 . |
interface-ptr |
A COM interface pointer for riid. |
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.
(get-active-object :progid "Excel.Application" :riid 'i-dispatch)
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41