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

NextPrevUpTopContentsIndex

create-instance

Function
Summary

Starts the implementation of a remote COM object and returns its interface pointer.

Package

com

Signature

create-instance clsid &key unknown-outer clsctx riid errorp => interface-ptr

Arguments

clsid

A string or a refguid giving a CLSID to create.

unknown-outer

A COM interface pointer specifying the outer i-unknown if the new instance is to be aggregated .

clsctx

A CLSCTX value, which defaults to CLSCTX_SERVER.

riid

An optional refiid giving the name of the COM interface return.

errorp

A boolean. The default is t.

Values

interface-ptr

A COM interface pointer for riid.

Description

Creates an instance of the COM server associated with clsid and returns an interface pointer for its riid interface. If riid is nil, then i-unknown is used.

If the server cannot be started, then an error of type com-error will be signaled if errorp is true, otherwise nil will be returned.

If unknown-outer is non-nil, it will be passed as the outer unknown interface to be aggregated with the new instance.

Notes

To create an i-dispatch interface and set an event handler, you can use create-instance-with-events.

Example
(create-instance
 "000209FF-0000-0000-C000-000000000046")
See also

refguid
refiid
i-unknown
create-object
create-instance-with-events


LispWorks COM/Automation User Guide and Reference Manual - 23 Mar 2017

NextPrevUpTopContentsIndex