/Zp
midl
/Zppacking_level
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.
Example
midl /Zp4 filename.idl
Remarks
The /Zp
switch is the same as the /pack option.
The /Zp
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++ 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 you do not specify the /Zp or /pack
switch is 8.
Note Do not use /Zp1
or /Zp2 on MIPS or Alpha platforms and do not use /Zp4 or /Zp8
on 16-bit platforms. Depending on the data type and memory location assigned by
the C compiler at run time, this can result in a data misalignment exception on
MIPS and Alpha platforms. On MS-DOS platforms, the C compiler will not ensure
the alignment at 4 or 8, and so the application may terminate.
See Also