midl /header filename
midl /header "bar.h" filename.idl
The /header switch specifies the name of the header file. The specified filename replaces the default filename. The default filename is obtained by replacing the IDL file extension (usually .IDL) with the extension .H. For OLE interfaces, the /header switch overrides the default name of the interface header file.
When you are importing files, the specified filename applies to only one header file — the header file that corresponds to the IDL file specified on the command line.
If filename does not include an explicit path, the file is written to the current directory or the directory specified by the /out switch. An explicit path in filename overrides the /out switch specification.
General MIDL Command-line Syntax, /h, /cstub, /out, /sstub, /proxy