midl /proxy proxy_file_name
midl /proxy my_proxy.c filename.idl
The /proxy switch specifies the name of the interface proxy file for a COM interface. The specified filename replaces the default filename obtained by adding _P.C to the name of the IDL file. The /proxy switch does not affect RPC interfaces.
If proxy_file_name does not include an explicit path, the file is written to the current directory or to the directory specified by the /out switch. An explicit path in proxy_file_name overrides the /out switch specification.
For a more detailed description of the interface proxy file and other files generated by the MIDL compiler, see General MIDL Command-line Syntax.
General MIDL Command-line Syntax, /header, /iid, /out