Export (0) Print
Expand All

/oldnames switch

The /oldnames switch directs the MIDL compiler to generate interface names that do not include the version number.


midl /oldnames

Switch Options

This switch has no parameters.

Remarks

The MIDL compiler incorporates the version number of the interface into the interface name that is generated in the stub (for example, iface_v1_0_ServerIfHandle). This naming format is consistent with the format used by the OSF DCE IDL compiler. However, it differs from the naming format used by the MIDL 1.0 compiler. The MIDL 1.0 compiler did not include version numbers in interface names (for example, iface_ServerIfHandle). The /oldnames switch allows you to instruct the MIDL compiler to generate interface names which do not include the version number. In this way, the format is consistent with names generated by the MIDL 1.0 compiler.

If you have server application code that was written for use with a stub generated by the MIDL 1.0 compiler and it refers to the MIDL-generated interface name (for example, in a call to RpcServerRegisterIf), you should change it to reference the style of interface name supported by version 2.0 or later of the MIDL compiler. Alternately, you can use the /oldnames switch when invoking the MIDL compiler.

Examples

midl /oldnames filename.idl

See also

General MIDL Command-line Syntax
Interface Definition (IDL) File

 

 

Community Additions

ADD
Show:
© 2015 Microsoft