/acf switch

The /acf switch allows the user to supply an explicit ACF file name. The switch also allows the use of different interface names in the IDL and ACF files.

midl /acf acf_filename

Switch Options


Specifies the name of the ACF. White space may or may not be present between the /acf switch and the file name.


By default, the MIDL compiler constructs the name of the ACF by replacing the IDL file name extension (usually .idl) with .acf. When the /acf switch is present, the ACF takes its name from the specified file name. The /acf switch applies only to the IDL file specified on the MIDL compiler command line. It does not apply to imported files.

When the /acf switch is used, the interface name in the ACF need not match the MIDL interface name. This feature allows interfaces to share an ACF specification.

When an absolute path to an ACF is not specified, the MIDL compiler searches in the current directory, directories supplied by the /I option, and directories in the INCLUDE path.

If the ACF is not found, the MIDL compiler assumes there is no ACF for this interface. For more information about the sequence of directories, see the reference entries for the /I and /no_def_idir switches. For more information relating to /acf, see Interface Definition (IDL) File.


midl /acf bar.acf filename.idl

See also

General MIDL Command-line Syntax



Community Additions

© 2015 Microsoft