Create an instance of a coclass.
com
create-object &key clsid progid clsctx => interface-ptr
clsid⇩ |
A string giving a CLSID to create. |
progid⇩ |
A string giving a ProgID to create. |
clsctx⇩ |
A CLSCTX value, which defaults to CLSCTX_SERVER . |
interface-ptr |
An i-dispatch interface pointer. |
The function create-object
creates an instance of a coclass and returns its i-dispatch
interface pointer. The coclass can be specified directly by supplying clsid or indirectly by supplying progid, which will locate the CLSID from the registry.
clsctx indicate the execution contexts in which an object is to be run. It defaults to CLSCTX_SERVER
.
You must initialize the COM runtime before calling create-object
(see 1.4 Initializing the COM runtime).
The following are equivalent ways of creating an Microsoft Word application object:
(create-object :progid "Word.Application.8")
(create-object :clsid "000209FF-0000-0000-C000-000000000046")
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41