08-20-2023, 06:22 PM
(08-20-2023, 06:15 PM)Jack Wrote: with all due respect to a740g, I am not comfortable with the padding in MENUITEMINFOTYPE MENUITEMINFO
this C code prints 80 as the size of MENUITEMINFO
Code: (Select All)#include <stdio.h>
#include <windows.h>
#include <winuser.h>
int main(void){
printf("%lld\n", sizeof(MENUITEMINFO));
return 0;
}
AS _UNSIGNED LONG cbSize 4
AS _UNSIGNED LONG fMask 8
AS _UNSIGNED LONG fType 12
AS _UNSIGNED LONG fState 16
AS _UNSIGNED LONG wID 20
AS STRING * 4 __padding1 24
AS _UNSIGNED _OFFSET hSubMenu 32
AS _UNSIGNED _OFFSET hbmpChecked 40
AS _UNSIGNED _OFFSET hbmpUnchecked 48
AS _UNSIGNED _OFFSET dwItemData 56
AS _UNSIGNED _OFFSET dwTypeData ' str ptr 64
AS _UNSIGNED LONG cch 68
AS STRING * 4 __padding2 72
AS _UNSIGNED _OFFSET hbmpItem 80
END TYPE
What's wrong with it?