/msc_ver switch

The /msc_ver switch is used to allow MIDL to generate code that includes optimizations for different versions of Microsoft C/C++ compilers.

midl /msc_ver version_number

Switch Options


Specifies an integer version number of the Microsoft Visual C++ compiler that will be used to compile the client and server stubs of the distributed application. The default version number is 1100, which corresponds to Visual C++ version 5.0. The version number 1200 corresponds to Visual C++ version 6.0, and so on.


In particular, version values of 1100 or greater cause the MIDL compiler to generate code utilizing the __declspec(uuid()) directive. It also activates macros that use the __declspec(selectany) and __declspec(novtable) directives.