midl /pack packing_level
midl /pack 2 filename.idl
midl /pack 8 bar.idl
The /pack switch is the same as the /Zp option. The /pack switch designates the packing level of structures in the target system. The packing-level value corresponds to the /Zp option value used by the Microsoft C/C++ version 7.0 compiler. For more information, see your Microsoft C/C++ programming documentation.
Specify the same packing level when you invoke the MIDL compiler and the C compiler. The default is 8.
For a discussion of the potential dangers in using nonstandard packing levels, see the /Zp help topic.
General MIDL Command-line Syntax, /env, /Zp