The size of the object/record is USUALLY not the same as the sizeof() of the corresponding struct, so in general it is unsafe to use sizeof() with this code.
Always use the U_SIZE_x instead!!!!
Note that some records may actually be much, much longer than their minimum size as they include strings, bitmaps, and such.
Documentation for each value is:
+ = same as struct size
or
X = different from struct size
followed by
Number (sizeof(struct) == size of the struct in bytes.)
#define U_SIZE_BITMAP16 10 |
#define U_SIZE_BITMAPCOREHEADER 12 |
#define U_SIZE_BITMAPINFOHEADER 40 |
#define U_SIZE_BITMAPV4HEADER 108 |
#define U_SIZE_BITMAPV5HEADER 124 |
#define U_SIZE_COLORREF 4 |
#define U_SIZE_FONT_CORE 18 |
X 20 Like U_FONT, but minus the FaceName part
#define U_SIZE_METARECORD 6 |
- 8 this might be different on 64 bit platform
#define U_SIZE_POLYPOLYGON 4 |
X 22 20 is minums the variable part
#define U_SIZE_WLOGBRUSH 8 |
#define U_SIZE_WMRANIMATEPALETTE 14 |
#define U_SIZE_WMRBITBLT_NOPX 24 |
#define U_SIZE_WMRBITBLT_PX 22 |
#define U_SIZE_WMRCHORD 22 |
#define U_SIZE_WMRCREATEBITMAP 6 |
#define U_SIZE_WMRCREATEBITMAPINDIRECT 6 |
#define U_SIZE_WMRCREATEBRUSHINDIRECT 14 |
#define U_SIZE_WMRCREATEFONTINDIRECT 26 |
#define U_SIZE_WMRCREATEPALETTE 14 |
#define U_SIZE_WMRCREATEPATTERNBRUSH 6 |
#define U_SIZE_WMRCREATEPENINDIRECT 16 |
#define U_SIZE_WMRCREATEREGION 26 |
#define U_SIZE_WMRDELETEOBJECT 8 |
#define U_SIZE_WMRDIBBITBLT_NOPX 24 |
#define U_SIZE_WMRDIBBITBLT_PX 22 |
#define U_SIZE_WMRDIBCREATEPATTERNBRUSH 10 |
#define U_SIZE_WMRDIBSTRETCHBLT_NOPX 28 |
#define U_SIZE_WMRDIBSTRETCHBLT_PX 26 |
#define U_SIZE_WMRDRAWTEXT 6 |
#define U_SIZE_WMRELLIPSE 14 |
#define U_SIZE_WMRESCAPE 10 |
X 12 Data field could be completely absent
#define U_SIZE_WMREXCLUDECLIPRECT 14 |
#define U_SIZE_WMREXTFLOODFILL 16 |
#define U_SIZE_WMREXTTEXTOUT 14 |
#define U_SIZE_WMRFILLREGION 10 |
#define U_SIZE_WMRFLOODFILL 16 |
#define U_SIZE_WMRFRAMEREGION 14 |
#define U_SIZE_WMRHEADER 18 |
#define U_SIZE_WMRINTERSECTCLIPRECT 14 |
#define U_SIZE_WMRINVERTREGION 8 |
#define U_SIZE_WMRLINETO 10 |
#define U_SIZE_WMRMOVETO 10 |
#define U_SIZE_WMROFFSETCLIPRGN 10 |
#define U_SIZE_WMROFFSETVIEWPORTORG 10 |
#define U_SIZE_WMROFFSETWINDOWORG 10 |
#define U_SIZE_WMRPAINTREGION 8 |
#define U_SIZE_WMRPATBLT 18 |
#define U_SIZE_WMRPLACEABLE 22 |
#define U_SIZE_WMRPOLYGON 10 |
#define U_SIZE_WMRPOLYLINE 10 |
#define U_SIZE_WMRPOLYPOLYGON 10 |
#define U_SIZE_WMRREALIZEPALETTE 6 |
#define U_SIZE_WMRRECTANGLE 14 |
#define U_SIZE_WMRRESIZEPALETTE 8 |
#define U_SIZE_WMRRESTOREDC 8 |
#define U_SIZE_WMRROUNDRECT 18 |
#define U_SIZE_WMRSAVEDC 6 |
#define U_SIZE_WMRSCALEVIEWPORTEXT 14 |
#define U_SIZE_WMRSCALEWINDOWEXT 14 |
#define U_SIZE_WMRSELECTCLIPREGION 8 |
#define U_SIZE_WMRSELECTOBJECT 8 |
#define U_SIZE_WMRSELECTPALETTE 8 |
#define U_SIZE_WMRSETBKCOLOR 10 |
#define U_SIZE_WMRSETBKMODE 8 |
X 12 last 2 bytes are optional
#define U_SIZE_WMRSETDIBTODEV 22 |
#define U_SIZE_WMRSETMAPMODE 8 |
#define U_SIZE_WMRSETMAPPERFLAGS 10 |
#define U_SIZE_WMRSETPALENTRIES 14 |
#define U_SIZE_WMRSETPIXEL 14 |
#define U_SIZE_WMRSETPOLYFILLMODE 8 |
X 12 last 2 bytes are optional
#define U_SIZE_WMRSETRELABS 6 |
#define U_SIZE_WMRSETROP2 8 |
X 12 last 2 bytes are optional
#define U_SIZE_WMRSETSTRETCHBLTMODE 8 |
X 12 last 2 bytes are optional
#define U_SIZE_WMRSETTEXTALIGN 8 |
X 12 last 2 bytes are optional
#define U_SIZE_WMRSETTEXTCHAREXTRA 8 |
#define U_SIZE_WMRSETTEXTCOLOR 10 |
#define U_SIZE_WMRSETTEXTJUSTIFICATION 10 |
#define U_SIZE_WMRSETVIEWPORTEXT 10 |
#define U_SIZE_WMRSETVIEWPORTORG 10 |
#define U_SIZE_WMRSETWINDOWEXT 10 |
#define U_SIZE_WMRSETWINDOWORG 10 |
#define U_SIZE_WMRSTRETCHBLT_NOPX 28 |
#define U_SIZE_WMRSTRETCHBLT_PX 26 |
#define U_SIZE_WMRSTRETCHDIB 28 |
#define U_SIZE_WMRTEXTOUT 8 |
X 12 (not including String,y,x)