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 COM interface name to return. If nil , then i-unknown is used.

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 the server cannot be started, then an error of type com-error will be signalled if errorp is non nil , 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.

Note: 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 - 17 Jul 2006

NextPrevUpTopContentsIndex