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

NextPrevUpTopContentsIndex

create-object

Function
Summary

Create an instance of a coclass.

Package

com

Signature

create-object &key clsid progid clsctx => interface-ptr

Arguments

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.

Values

interface-ptr

An i-dispatch interface pointer.

Description

Creates an instance of a coclass and returns its i-dispatch interface pointer. The coclass can be specified directly by using the clsid argument or indirectly using the progid argument, which will locate the CLSID from the registry.

Examples

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")
See also

with-coclass


LispWorks COM/Automation User Guide and Reference Manual - 14 Feb 2015

NextPrevUpTopContentsIndex