NextPrevUpTopContentsIndex

midl

Function
Summary

Converts an IDL file into Lisp FLI definitions.

Package

com

Signature

midl file &key package depth mapping-options output-file load import-search-path

Arguments

file

A pathname designator giving the name of an IDL file.

package

The package in which definitions are created. Defaults to the current package.

depth

How many levels of IDL import statement to convert to Lisp. This defaults to 0, which means only convert definitions for the IDL file itself. Imported files should be converted and loaded before the importing file. Some of the standard files are preloaded, so should not be loaded again (see Standard IDL files).

mapping-options

Allows options to be passed controlling the conversion of individual definitions.

output-file

If this is nil (the default), the IDL file is compiled in-memory. Otherwise a Lisp fasl is produced so the definitions can be reloaded without requiring recompilation. If output-file is t then the fasl is named after the IDL file, otherwise output-file is used as a pathname designator to specify the name of the fasl file.

load

If this is non nil (the default) then any fasl produced is loaded after being compiled. Otherwise, the fasl must be loaded explicitly with load . This argument has no effect if output-file is nil .

import-search-path

Specifies where to look for files referenced by import statements in the IDL. The default value, which is :default , causes a search in the same directory as file . Otherwise the value should be a list of pathname designators specifying directories to search. After searching using the value of import-search-path , midl looks in any directory in the INCLUDE environment variable.

Description

This function is used to convert an IDL file into Lisp FLI definitions, which is necessary before the types in the file can be used from the Lisp COM API. See The mapping from COM names to Lisp symbols for the details on how these FLI definitions are named.

Note: midl requires that types like IDispatch are declared before they are used.

Examples

To compile myfile.idl into memory:

(midl "myfile.idl")

To compile myfile.idl to myfile.ofasl :

(midl "myfile.idl" :output-file t :load nil)

To compile myfile.idl to myfile.ofasl and load it:

(midl "myfile.idl" :output-file t)
See also

:midl-file


LispWorks COM/Automation User Guide and Reference Manual - 17 Jul 2006

NextPrevUpTopContentsIndex