/pack switch

The /pack switch is the same as the /Zp option.


midl /pack packing_level

Switch Options

packing_level

Specifies the packing level of structures in the target system. The packing-level value can be set to 1, 2, 4, or 8.

Remarks

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 packing level used when neither the /Zp nor /pack switch is specified is 8, in both all build environments.

For a discussion of the potential dangers in using nonstandard packing levels, see the /Zp help topic.

Examples

midl /pack 2 filename.idl

midl /pack 8 bar.idl

See also

General MIDL Command-line Syntax
/env
/Zp

 

 

Show: