|
Hello Diane, You wrote: >Can you please provide additional information on which MATRMD include >field you needed to change to packed? The include file is QSYSINC/MIH/MATRMD. The structure that is missing the _Packed qualifier is _MATRMD_0x17_Template_T. The lack of _Packed causes 2 bytes of padding to be inserted after Req_Fnc, and 2 bytes of padding to be inserted after _MATRMD17_Elements[1]. Here is the relevant section from the compilers aggregate listing: | 16 | 100 | Alloc_Dealloc_Ct | 16 | 2 | Req_Fnc | 18 | 2 | ***PADDING*** | 20 | 4 | Total_TTs | 24 | 4 | Ret_TTs | 28 | 6 | reserved1[6] | 34 | 80 | _MATRMD17_Elements[1] | 114 | 2 | ***PADDING*** I have copied the corrected structure below. The line I changed has SHC as the change flag. typedef _Packed struct _MATRMD_0x17_Template_T { /*SHC*//*@G1A*/ /* Alloc / Dealloc control 0x17 */ short Req_Fnc; /* Requested function */ /* 0001 - sorted by stg alloc */ /* 0002 - sorted by stg deallc*/ /* 0003 - sorted by net stg */ unsigned int Total_TTs; /* Total tasks and threads */ unsigned int Ret_TTs; /* Returned number of T/Ts */ char reserved1[6]; /* Reserved space */ _MATRMD17_T _MATRMD17_Elements[1]; /* This array is only designated [1], however the structure is */ /* repeated for each task/thread up to the returned number of */ /* task/thread in the Ret_TTs variable. To access this data, */ /* reference out of array bounds. The 15th element's data is */ /* in: structname._MATRMD17_Elements[14] for example. */ } _MATRMD_0x17_Template_T; Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.