Differences Between MIDL and MkTypLib

There are a few key areas in which the MIDL compiler differs from the MkTypLib utility. Most of these differences arise because MIDL is more C-syntax oriented than MkTypLib. All of the differences described here, with the exception of floating point constants and the enum scope, can be resolved by using the /mktyplib203 MIDL compiler option (see “The /mktyplib203 Option” later in this chapter). This switch forces MIDL to behave like MkTypLib.exe, version 2.03, the last release of MkTypLib.exe.

In general, you will want to use the MIDL syntax in your .idl files. However, the /mktyplib203 option is useful if you need to compile an existing .odl file, or otherwise maintain compatibility with MkTypLib.