MIDL Compiler Options

You can use the following command-line options to override some of the default behavior of the MIDL compiler and to choose optimizations appropriate for your application. For a complete listing of MIDL command-line options, see the MIDL Command-Line Reference.

Command line switch Description
/acf
Use to supply an explicit ACF filename. This switch also enables the use of different interface names in the IDL and ACF files.
/dlldata
Specifies a filename for the generated DLL data file for a proxy DLL. The default filename is Dlldata.c.
/env
Directs MIDL to generate stubs or a type library for a target environment.
/header, /h
Specifies the name of the interface header file. The default name is that of the IDL file with an .h extension.
/iid
Specifies an interface identifier filename that overrides the default interface identifier filename for a COM interface.
/lcid
Provides full DBCS support so that you can use international characters in your input files, filenames, and directory paths.
/no_format_opt
By default, to reduce code size, MIDL eliminates duplicate descriptors. This switch turns off this optimizing behavior.
/Oi, /Oic, /Oif
Directs MIDL to use a fully interpreted marshaling method. The /Oic and /Oicf switches provide additional performance enhancements.
/out
Specifies the directory to which the MIDL compiler writes output files. The output directory can be specified with a drive letter, an absolute pathname, or both. The default is that MIDL writes the files to the current directory.
/proxy
Specifies the name of the interface proxy file for a COM interface. The default name is that of the IDL file plus "_p.c".
/tlb
Specifies the name of the type library file. The default name is that of the IDL file, with a .tlb extension.

MIDL Compilation