Converts an IDL file into Lisp FLI definitions.




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



A pathname designator giving the name of an IDL file.


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


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).


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


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.


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 .


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.


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.


To compile myfile.idl into memory:

(midl "myfile.idl")

To compile myfile.idl to myfile.fsl :

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

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

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


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