Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
API Questions
#21
(08-20-2023, 06:15 PM)Jack Wrote: with all due respect to a740g, I am not comfortable with the padding in 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;
}
80 is correct.

Quote:Len of MENUITEMINFO = 80
sizeof(MENUITEMINFO) = 80
Steve is correct. Without the padding it will be far less than 80 and crash.
Reply


Messages In This Thread
API Questions - by TerryRitchie - 08-18-2023, 07:35 PM
RE: API Questions - by SpriggsySpriggs - 08-18-2023, 07:51 PM
RE: API Questions - by TerryRitchie - 08-18-2023, 07:55 PM
RE: API Questions - by SMcNeill - 08-18-2023, 10:36 PM
RE: API Questions - by SMcNeill - 08-18-2023, 10:45 PM
RE: API Questions - by SpriggsySpriggs - 08-18-2023, 10:48 PM
RE: API Questions - by TerryRitchie - 08-19-2023, 02:06 AM
RE: API Questions - by SpriggsySpriggs - 08-19-2023, 04:32 AM
RE: API Questions - by TerryRitchie - 08-19-2023, 03:32 PM
RE: API Questions - by Dav - 08-19-2023, 03:48 PM
RE: API Questions - by TerryRitchie - 08-19-2023, 03:53 PM
RE: API Questions - by SpriggsySpriggs - 08-19-2023, 09:10 PM
RE: API Questions - by TerryRitchie - 08-19-2023, 09:45 PM
RE: API Questions - by Jack - 08-19-2023, 10:45 PM
RE: API Questions - by TerryRitchie - 08-19-2023, 11:06 PM
RE: API Questions - by a740g - 08-20-2023, 12:01 AM
RE: API Questions - by TerryRitchie - 08-20-2023, 05:47 PM
RE: API Questions - by SMcNeill - 08-20-2023, 06:04 PM
RE: API Questions - by a740g - 08-20-2023, 06:32 PM
RE: API Questions - by SMcNeill - 08-20-2023, 06:08 PM
RE: API Questions - by Jack - 08-20-2023, 06:15 PM
RE: API Questions - by a740g - 08-20-2023, 06:20 PM
RE: API Questions - by SMcNeill - 08-20-2023, 06:22 PM
RE: API Questions - by a740g - 08-20-2023, 06:23 PM
RE: API Questions - by SpriggsySpriggs - 08-20-2023, 11:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Hardware images questions Dav 5 473 12-04-2025, 04:18 PM
Last Post: Pete
  A couple of loadimage questions. Pete 7 1,226 04-13-2025, 03:33 PM
Last Post: Kernelpanic
  $RESIZE questions TerryRitchie 8 2,040 06-07-2024, 03:38 PM
Last Post: TerryRitchie
Question reading multiple mice absolute position, keyboard with raw input api ? madscijr 1 742 05-29-2024, 05:38 PM
Last Post: madscijr
Question why are these API declarations causing compilation to fail? madscijr 2 864 05-24-2024, 10:52 PM
Last Post: madscijr

Forum Jump:


Users browsing this thread: 1 Guest(s)