Next Previous Up Top Contents Index

A Creating COM Projects

A.4 The type library tool and specification files

The type library tool is invoked any time you build a project which includes a a type library tool specification, or .SPEC, file. This is a text file, where the first line must be:

Origin: COM-type-library 

This line identifies that the type library tool should be used to process the file. When it runs, the type library tool will regenerate the module and stub files when they do not exist, or if the .SPEC file has been modified more recently then the last build.

Type library tool specification files can contain the following keywords:

Type-library:

SPEC file keyword

Type-library: typelibrary-path 

Required. Specifies the pathname of the type library to translate. If typelibrary-path is a relative path, it is considered to be relative to the location of the specification file.
Module-file:

SPEC file keyword

Module-file: module-file-to-generate 

Required. Specifies the pathname of the module file to generate. The file will be created, if necessary, and added to the project, if necessary.
Module:

SPEC file keyword

Module: module-name-to-generate 

Required. The name of the module definition to generate. This module definition is placed in the file module-file-to-generate.
Stub-file:

SPEC file keyword

Stub-file: stub-file-to-generate 

Required. Specifies the pathname of the Dylan source file to generate. This file will be created, if necessary, and added to the project, if necessary.
Generate:

SPEC file keyword

Generate: type-of-stubs 

Required. Determines what type of stubs are generated in the file specified using Stub-file:. Possible values of type-of-stubs are:
dispatch-clients

Dispatch client code is generated, using define dispatch-client.
dispatch-servers

Dispatch server code is generated, using define dispatch-interface.
vtable-interfaces

Custom (vtable) interfaces are generated, using define vtable-interface. The names of server interfaces are affected by the value of Server-suffix: (below). The names of client interfaces and whether client interfaces are generated are affected by the presence and the value of Client-suffix: (below).
dual-interfaces

Dual (vtable and dispatch) interfaces are generated, using define vtable-interface. The names of server interfaces are affected by the value of Server-suffix:. The names of client interfaces and whether client interfaces are generated are affected by the presence and the value of Client-suffix:.
Server-suffix:

SPEC file keyword

Server-suffix: server-suffix 

Optional. Only meaningful when Generate:'s type-of-stubs argument is vtable-interfaces or dual-interfaces. Specifies a suffix which is appended to generated server interface names. If no value is provided or the Server-suffix: keyword is omitted then no suffix is appended.
Client-suffix:

SPEC file keyword

Client-suffix: client-suffix 

Optional. Only meaningful when Generate:'s type-of-stubs argument is vtable-interfaces or dual-interfaces. Specifies a suffix which is appended to generated client interface names. If the Client-suffix: keyword is omitted then client classes are not generated (the client-class clause is not provided to the define vtable-interfaces or define dual-interfaces macro invocation). To generate client classes but not append a suffix, an empty value must be provided to the Client-suffix: keyword. For example:
Client-suffix: 

Interfaces:

SPEC file keyword

Interfaces: interfaces-and-coclasses-to-translate 

Optional. If provided, specifies the names of the interfaces and COM classes to translate. If not provided, all interfaces and COM classes are translated. All interfaces or COM classes after the first listed should be provided on a new line, preceded by a tab or spaces. For example:
Interfaces: IInterfaceOne
            InterfaceOneCoclass
            IInterfaceTwo
            InterfaceTwoCoclass


Getting Started with Functional Developer - 31 MAR 2000

Next Previous Up Top Contents Index