midl /D name=definition
midl -DUNICODE filename.idl
The /D switch defines a name and an optional value to be passed to the C preprocessor as if by a #define directive. Multiple /D directives can be used in a command line. White space between the /D switch and the defined name is optional.
When the /cpp_cmd switch is present and the /cpp_opt switch is not, the MIDL compiler concatenates the string specified by the /cpp_cmd switch with the /I, /D, and /U options and uses this concatenated string to invoke the C preprocessor for each IDL and ACF source file.
The MIDL compiler switch /D is ignored when the MIDL compiler switch /no_cpp or /cpp_opt is specified.
/cpp_cmd, /cpp_opt, /I, General MIDL Command-line Syntax, /no_cpp, /U