midl /Zs
midl /syntax_check
midl /Zs filename.idl
midl /syntax_check filename.idl
The /Zs switch indicates that the compiler only checks syntax and does not generate output files.
This switch overrides all other switches that specify information about output files.
You can also specify syntax-checking mode with the MIDL compiler switch /syntax_check.
General MIDL Command-line Syntax, /syntax_check