diff --git a/dlls/gdi/tests/generated.c b/dlls/gdi/tests/generated.c index 47c51cc330e..baa1ae9616a 100644 --- a/dlls/gdi/tests/generated.c +++ b/dlls/gdi/tests/generated.c @@ -34,6 +34,22 @@ /* FIXME: Not sure if is possible to do without compiler extension */ #endif +#if (_MSC_VER >= 1300) && defined(__cplusplus) +# define _TYPE_ALIGNMENT(type) __alignof(type) +#elif defined(__GNUC__) +# define _TYPE_ALIGNMENT(type) __alignof__(type) +#else +/* + * FIXME: Not sure if is possible to do without compiler extension + * (if type is not just a name that is, if so the normal) + * TYPE_ALIGNMENT can be used) + */ +#endif + +#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) +# define TYPE_ALIGNMENT _TYPE_ALIGNMENT +#endif + /*********************************************************************** * Test helper macros */ @@ -52,8 +68,19 @@ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \ FIELD_OFFSET(type, field)) +#ifdef _TYPE_ALIGNMENT +#define TEST__TYPE_ALIGNMENT(type, align) \ + ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _TYPE_ALIGNMENT(type)) +#else +# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) +#endif + +#ifdef TYPE_ALIGNMENT #define TEST_TYPE_ALIGNMENT(type, align) \ ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", TYPE_ALIGNMENT(type)) +#else +# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) +#endif #define TEST_TYPE_SIZE(type, size) \ ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")", sizeof(type)) @@ -71,6 +98,16 @@ TEST_TYPE_ALIGNMENT(type, align); \ TEST_TYPE_SIZE(type, size) +#define TEST_TYPE_POINTER(type, size, align) \ + TEST__TYPE_ALIGNMENT(*(type)0, align); \ + TEST_TYPE_SIZE(*(type)0, size) + +#define TEST_TYPE_SIGNED(type) \ + ok((type) -1 < 0, "(" #type ") -1 < 0"); + +#define TEST_TYPE_UNSIGNED(type) \ + ok((type) -1 > 0, "(" #type ") -1 > 0"); + void test_pack(void) { /* ABC (pack 4) */ @@ -85,6 +122,8 @@ void test_pack(void) TEST_FIELD(ABCFLOAT, FLOAT, abcfB, 4, 4, 4); TEST_FIELD(ABCFLOAT, FLOAT, abcfC, 8, 4, 4); + /* ABORTPROC */ + /* BITMAP (pack 4) */ TEST_TYPE(BITMAP, 24, 4); TEST_FIELD(BITMAP, INT, bmType, 0, 4, 4); @@ -210,6 +249,9 @@ void test_pack(void) TEST_FIELD(CIEXYZTRIPLE, CIEXYZ, ciexyzGreen, 12, 12, 4); TEST_FIELD(CIEXYZTRIPLE, CIEXYZ, ciexyzBlue, 24, 12, 4); + /* COLOR16 */ + TEST_TYPE(COLOR16, 2, 2); + /* COLORADJUSTMENT (pack 4) */ TEST_TYPE(COLORADJUSTMENT, 24, 2); TEST_FIELD(COLORADJUSTMENT, WORD, caSize, 0, 2, 2); @@ -233,13 +275,13 @@ void test_pack(void) TEST_FIELD(DIBSECTION, HANDLE, dshSection, 76, 4, 4); TEST_FIELD(DIBSECTION, DWORD, dsOffset, 80, 4, 4); - /* DISPLAY_DEVICEA */ + /* DISPLAY_DEVICEA (pack 4) */ TEST_FIELD(DISPLAY_DEVICEA, DWORD, cb, 0, 4, 4); TEST_FIELD(DISPLAY_DEVICEA, CHAR[32], DeviceName, 4, 32, 1); TEST_FIELD(DISPLAY_DEVICEA, CHAR[128], DeviceString, 36, 128, 1); TEST_FIELD(DISPLAY_DEVICEA, DWORD, StateFlags, 164, 4, 4); - /* DISPLAY_DEVICEW */ + /* DISPLAY_DEVICEW (pack 4) */ TEST_FIELD(DISPLAY_DEVICEW, DWORD, cb, 0, 4, 4); TEST_FIELD(DISPLAY_DEVICEW, WCHAR[32], DeviceName, 4, 64, 2); TEST_FIELD(DISPLAY_DEVICEW, WCHAR[128], DeviceString, 68, 256, 2); @@ -710,7 +752,7 @@ void test_pack(void) TEST_FIELD(EMRTEXT, RECTL, rcl, 20, 16, 4); TEST_FIELD(EMRTEXT, DWORD, offDx, 36, 4, 4); - /* ENHMETAHEADER */ + /* ENHMETAHEADER (pack 4) */ TEST_FIELD(ENHMETAHEADER, DWORD, iType, 0, 4, 4); TEST_FIELD(ENHMETAHEADER, DWORD, nSize, 4, 4, 4); TEST_FIELD(ENHMETAHEADER, RECTL, rclBounds, 8, 16, 4); @@ -736,6 +778,8 @@ void test_pack(void) TEST_FIELD(ENHMETARECORD, DWORD, nSize, 4, 4, 4); TEST_FIELD(ENHMETARECORD, DWORD[1], dParm, 8, 4, 4); + /* ENHMFENUMPROC */ + /* ENUMLOGFONTA (pack 4) */ TEST_TYPE(ENUMLOGFONTA, 156, 4); TEST_FIELD(ENUMLOGFONTA, LOGFONTA, elfLogFont, 0, 60, 4); @@ -803,11 +847,25 @@ void test_pack(void) TEST_FIELD(FIXED, WORD, fract, 0, 2, 2); TEST_FIELD(FIXED, SHORT, value, 2, 2, 2); + /* FONTENUMPROCA */ + + /* FONTENUMPROCEXA */ + + /* FONTENUMPROCEXW */ + + /* FONTENUMPROCW */ + /* FONTSIGNATURE (pack 4) */ TEST_TYPE(FONTSIGNATURE, 24, 4); TEST_FIELD(FONTSIGNATURE, DWORD[4], fsUsb, 0, 16, 4); TEST_FIELD(FONTSIGNATURE, DWORD[2], fsCsb, 16, 8, 4); + /* FXPT16DOT16 */ + TEST_TYPE(FXPT16DOT16, 4, 4); + + /* FXPT2DOT30 */ + TEST_TYPE(FXPT2DOT30, 4, 4); + /* GCP_RESULTSA (pack 4) */ TEST_TYPE(GCP_RESULTSA, 36, 4); TEST_FIELD(GCP_RESULTSA, DWORD, lStructSize, 0, 4, 4); @@ -840,6 +898,8 @@ void test_pack(void) TEST_FIELD(GLYPHMETRICS, SHORT, gmCellIncX, 16, 2, 2); TEST_FIELD(GLYPHMETRICS, SHORT, gmCellIncY, 18, 2, 2); + /* GOBJENUMPROC */ + /* GRADIENT_RECT (pack 4) */ TEST_TYPE(GRADIENT_RECT, 8, 4); TEST_FIELD(GRADIENT_RECT, ULONG, UpperLeft, 0, 4, 4); @@ -861,6 +921,14 @@ void test_pack(void) TEST_FIELD(KERNINGPAIR, WORD, wSecond, 2, 2, 2); TEST_FIELD(KERNINGPAIR, INT, iKernAmount, 4, 4, 4); + /* LCSCSTYPE */ + TEST_TYPE(LCSCSTYPE, 4, 4); + + /* LCSGAMUTMATCH */ + TEST_TYPE(LCSGAMUTMATCH, 4, 4); + + /* LINEDDAPROC */ + /* LOCALESIGNATURE (pack 4) */ TEST_TYPE(LOCALESIGNATURE, 32, 4); TEST_FIELD(LOCALESIGNATURE, DWORD[4], lsUsb, 0, 16, 4); @@ -939,6 +1007,265 @@ void test_pack(void) TEST_FIELD(LOGPEN, POINT, lopnWidth, 4, 8, 4); TEST_FIELD(LOGPEN, COLORREF, lopnColor, 12, 4, 4); + /* LPABC */ + TEST_TYPE(LPABC, 4, 4); + TEST_TYPE_POINTER(LPABC, 12, 4); + + /* LPABCFLOAT */ + TEST_TYPE(LPABCFLOAT, 4, 4); + TEST_TYPE_POINTER(LPABCFLOAT, 12, 4); + + /* LPBITMAP */ + TEST_TYPE(LPBITMAP, 4, 4); + TEST_TYPE_POINTER(LPBITMAP, 24, 4); + + /* LPBITMAPCOREHEADER */ + TEST_TYPE(LPBITMAPCOREHEADER, 4, 4); + TEST_TYPE_POINTER(LPBITMAPCOREHEADER, 12, 4); + + /* LPBITMAPCOREINFO */ + TEST_TYPE(LPBITMAPCOREINFO, 4, 4); + TEST_TYPE_POINTER(LPBITMAPCOREINFO, 16, 4); + + /* LPBITMAPFILEHEADER */ + TEST_TYPE(LPBITMAPFILEHEADER, 4, 4); + TEST_TYPE_POINTER(LPBITMAPFILEHEADER, 14, 2); + + /* LPBITMAPINFO */ + TEST_TYPE(LPBITMAPINFO, 4, 4); + TEST_TYPE_POINTER(LPBITMAPINFO, 44, 4); + + /* LPBITMAPINFOHEADER */ + TEST_TYPE(LPBITMAPINFOHEADER, 4, 4); + TEST_TYPE_POINTER(LPBITMAPINFOHEADER, 40, 4); + + /* LPBITMAPV5HEADER */ + TEST_TYPE(LPBITMAPV5HEADER, 4, 4); + TEST_TYPE_POINTER(LPBITMAPV5HEADER, 124, 4); + + /* LPCHARSETINFO */ + TEST_TYPE(LPCHARSETINFO, 4, 4); + TEST_TYPE_POINTER(LPCHARSETINFO, 32, 4); + + /* LPCIEXYZ */ + TEST_TYPE(LPCIEXYZ, 4, 4); + TEST_TYPE_POINTER(LPCIEXYZ, 12, 4); + + /* LPCIEXYZTRIPLE */ + TEST_TYPE(LPCIEXYZTRIPLE, 4, 4); + TEST_TYPE_POINTER(LPCIEXYZTRIPLE, 36, 4); + + /* LPCOLORADJUSTMENT */ + TEST_TYPE(LPCOLORADJUSTMENT, 4, 4); + TEST_TYPE_POINTER(LPCOLORADJUSTMENT, 24, 2); + + /* LPDEVMODEA */ + TEST_TYPE(LPDEVMODEA, 4, 4); + + /* LPDEVMODEW */ + TEST_TYPE(LPDEVMODEW, 4, 4); + + /* LPDIBSECTION */ + TEST_TYPE(LPDIBSECTION, 4, 4); + TEST_TYPE_POINTER(LPDIBSECTION, 84, 4); + + /* LPDISPLAY_DEVICEA */ + TEST_TYPE(LPDISPLAY_DEVICEA, 4, 4); + + /* LPDISPLAY_DEVICEW */ + TEST_TYPE(LPDISPLAY_DEVICEW, 4, 4); + + /* LPDOCINFOA */ + TEST_TYPE(LPDOCINFOA, 4, 4); + TEST_TYPE_POINTER(LPDOCINFOA, 20, 4); + + /* LPDOCINFOW */ + TEST_TYPE(LPDOCINFOW, 4, 4); + TEST_TYPE_POINTER(LPDOCINFOW, 20, 4); + + /* LPENHMETAHEADER */ + TEST_TYPE(LPENHMETAHEADER, 4, 4); + + /* LPENHMETARECORD */ + TEST_TYPE(LPENHMETARECORD, 4, 4); + TEST_TYPE_POINTER(LPENHMETARECORD, 12, 4); + + /* LPENUMLOGFONTA */ + TEST_TYPE(LPENUMLOGFONTA, 4, 4); + TEST_TYPE_POINTER(LPENUMLOGFONTA, 156, 4); + + /* LPENUMLOGFONTEXA */ + TEST_TYPE(LPENUMLOGFONTEXA, 4, 4); + TEST_TYPE_POINTER(LPENUMLOGFONTEXA, 188, 4); + + /* LPENUMLOGFONTEXW */ + TEST_TYPE(LPENUMLOGFONTEXW, 4, 4); + TEST_TYPE_POINTER(LPENUMLOGFONTEXW, 348, 4); + + /* LPENUMLOGFONTW */ + TEST_TYPE(LPENUMLOGFONTW, 4, 4); + TEST_TYPE_POINTER(LPENUMLOGFONTW, 284, 4); + + /* LPEXTLOGFONTA */ + TEST_TYPE(LPEXTLOGFONTA, 4, 4); + TEST_TYPE_POINTER(LPEXTLOGFONTA, 192, 4); + + /* LPEXTLOGFONTW */ + TEST_TYPE(LPEXTLOGFONTW, 4, 4); + TEST_TYPE_POINTER(LPEXTLOGFONTW, 320, 4); + + /* LPEXTLOGPEN */ + TEST_TYPE(LPEXTLOGPEN, 4, 4); + TEST_TYPE_POINTER(LPEXTLOGPEN, 28, 4); + + /* LPFONTSIGNATURE */ + TEST_TYPE(LPFONTSIGNATURE, 4, 4); + TEST_TYPE_POINTER(LPFONTSIGNATURE, 24, 4); + + /* LPGCP_RESULTSA */ + TEST_TYPE(LPGCP_RESULTSA, 4, 4); + TEST_TYPE_POINTER(LPGCP_RESULTSA, 36, 4); + + /* LPGCP_RESULTSW */ + TEST_TYPE(LPGCP_RESULTSW, 4, 4); + TEST_TYPE_POINTER(LPGCP_RESULTSW, 36, 4); + + /* LPGLYPHMETRICS */ + TEST_TYPE(LPGLYPHMETRICS, 4, 4); + TEST_TYPE_POINTER(LPGLYPHMETRICS, 20, 4); + + /* LPGRADIENT_RECT */ + TEST_TYPE(LPGRADIENT_RECT, 4, 4); + TEST_TYPE_POINTER(LPGRADIENT_RECT, 8, 4); + + /* LPGRADIENT_TRIANGLE */ + TEST_TYPE(LPGRADIENT_TRIANGLE, 4, 4); + TEST_TYPE_POINTER(LPGRADIENT_TRIANGLE, 12, 4); + + /* LPHANDLETABLE */ + TEST_TYPE(LPHANDLETABLE, 4, 4); + TEST_TYPE_POINTER(LPHANDLETABLE, 4, 4); + + /* LPKERNINGPAIR */ + TEST_TYPE(LPKERNINGPAIR, 4, 4); + TEST_TYPE_POINTER(LPKERNINGPAIR, 8, 4); + + /* LPLOGBRUSH */ + TEST_TYPE(LPLOGBRUSH, 4, 4); + TEST_TYPE_POINTER(LPLOGBRUSH, 12, 4); + + /* LPLOGCOLORSPACEA */ + TEST_TYPE(LPLOGCOLORSPACEA, 4, 4); + TEST_TYPE_POINTER(LPLOGCOLORSPACEA, 328, 4); + + /* LPLOGCOLORSPACEW */ + TEST_TYPE(LPLOGCOLORSPACEW, 4, 4); + TEST_TYPE_POINTER(LPLOGCOLORSPACEW, 588, 4); + + /* LPLOGFONTA */ + TEST_TYPE(LPLOGFONTA, 4, 4); + TEST_TYPE_POINTER(LPLOGFONTA, 60, 4); + + /* LPLOGFONTW */ + TEST_TYPE(LPLOGFONTW, 4, 4); + TEST_TYPE_POINTER(LPLOGFONTW, 92, 4); + + /* LPLOGPEN */ + TEST_TYPE(LPLOGPEN, 4, 4); + TEST_TYPE_POINTER(LPLOGPEN, 16, 4); + + /* LPMAT2 */ + TEST_TYPE(LPMAT2, 4, 4); + TEST_TYPE_POINTER(LPMAT2, 16, 2); + + /* LPMETAFILEPICT */ + TEST_TYPE(LPMETAFILEPICT, 4, 4); + TEST_TYPE_POINTER(LPMETAFILEPICT, 16, 4); + + /* LPMETAHEADER */ + TEST_TYPE(LPMETAHEADER, 4, 4); + TEST_TYPE_POINTER(LPMETAHEADER, 18, 2); + + /* LPMETARECORD */ + TEST_TYPE(LPMETARECORD, 4, 4); + TEST_TYPE_POINTER(LPMETARECORD, 8, 4); + + /* LPNEWTEXTMETRICA */ + TEST_TYPE(LPNEWTEXTMETRICA, 4, 4); + TEST_TYPE_POINTER(LPNEWTEXTMETRICA, 72, 4); + + /* LPNEWTEXTMETRICW */ + TEST_TYPE(LPNEWTEXTMETRICW, 4, 4); + TEST_TYPE_POINTER(LPNEWTEXTMETRICW, 76, 4); + + /* LPOUTLINETEXTMETRICA */ + TEST_TYPE(LPOUTLINETEXTMETRICA, 4, 4); + TEST_TYPE_POINTER(LPOUTLINETEXTMETRICA, 212, 4); + + /* LPOUTLINETEXTMETRICW */ + TEST_TYPE(LPOUTLINETEXTMETRICW, 4, 4); + TEST_TYPE_POINTER(LPOUTLINETEXTMETRICW, 216, 4); + + /* LPPANOSE */ + TEST_TYPE(LPPANOSE, 4, 4); + TEST_TYPE_POINTER(LPPANOSE, 10, 1); + + /* LPPELARRAY */ + TEST_TYPE(LPPELARRAY, 4, 4); + TEST_TYPE_POINTER(LPPELARRAY, 20, 4); + + /* LPPIXELFORMATDESCRIPTOR */ + TEST_TYPE(LPPIXELFORMATDESCRIPTOR, 4, 4); + TEST_TYPE_POINTER(LPPIXELFORMATDESCRIPTOR, 40, 4); + + /* LPPOINTFX */ + TEST_TYPE(LPPOINTFX, 4, 4); + TEST_TYPE_POINTER(LPPOINTFX, 8, 2); + + /* LPPOLYTEXTA */ + TEST_TYPE(LPPOLYTEXTA, 4, 4); + TEST_TYPE_POINTER(LPPOLYTEXTA, 40, 4); + + /* LPPOLYTEXTW */ + TEST_TYPE(LPPOLYTEXTW, 4, 4); + TEST_TYPE_POINTER(LPPOLYTEXTW, 40, 4); + + /* LPRASTERIZER_STATUS */ + TEST_TYPE(LPRASTERIZER_STATUS, 4, 4); + TEST_TYPE_POINTER(LPRASTERIZER_STATUS, 6, 2); + + /* LPRGBQUAD */ + TEST_TYPE(LPRGBQUAD, 4, 4); + TEST_TYPE_POINTER(LPRGBQUAD, 4, 1); + + /* LPRGNDATA */ + TEST_TYPE(LPRGNDATA, 4, 4); + TEST_TYPE_POINTER(LPRGNDATA, 36, 4); + + /* LPTEXTMETRICA */ + TEST_TYPE(LPTEXTMETRICA, 4, 4); + TEST_TYPE_POINTER(LPTEXTMETRICA, 56, 4); + + /* LPTEXTMETRICW */ + TEST_TYPE(LPTEXTMETRICW, 4, 4); + TEST_TYPE_POINTER(LPTEXTMETRICW, 60, 4); + + /* LPTRIVERTEX */ + TEST_TYPE(LPTRIVERTEX, 4, 4); + TEST_TYPE_POINTER(LPTRIVERTEX, 16, 4); + + /* LPTTPOLYCURVE */ + TEST_TYPE(LPTTPOLYCURVE, 4, 4); + TEST_TYPE_POINTER(LPTTPOLYCURVE, 12, 2); + + /* LPTTPOLYGONHEADER */ + TEST_TYPE(LPTTPOLYGONHEADER, 4, 4); + TEST_TYPE_POINTER(LPTTPOLYGONHEADER, 16, 4); + + /* LPXFORM */ + TEST_TYPE(LPXFORM, 4, 4); + TEST_TYPE_POINTER(LPXFORM, 24, 4); + /* MAT2 (pack 4) */ TEST_TYPE(MAT2, 16, 2); TEST_FIELD(MAT2, FIXED, eM11, 0, 4, 2); @@ -969,6 +1296,8 @@ void test_pack(void) TEST_FIELD(METARECORD, WORD, rdFunction, 4, 2, 2); TEST_FIELD(METARECORD, WORD[1], rdParm, 6, 2, 2); + /* MFENUMPROC */ + /* NEWTEXTMETRICA (pack 4) */ TEST_TYPE(NEWTEXTMETRICA, 72, 4); TEST_FIELD(NEWTEXTMETRICA, LONG, tmHeight, 0, 4, 4); @@ -1033,6 +1362,14 @@ void test_pack(void) TEST_FIELD(NEWTEXTMETRICW, UINT, ntmCellHeight, 68, 4, 4); TEST_FIELD(NEWTEXTMETRICW, UINT, ntmAvgWidth, 72, 4, 4); + /* NPEXTLOGPEN */ + TEST_TYPE(NPEXTLOGPEN, 4, 4); + TEST_TYPE_POINTER(NPEXTLOGPEN, 28, 4); + + /* OLDFONTENUMPROCA */ + + /* OLDFONTENUMPROCW */ + /* OUTLINETEXTMETRICA (pack 4) */ TEST_TYPE(OUTLINETEXTMETRICA, 212, 4); TEST_FIELD(OUTLINETEXTMETRICA, UINT, otmSize, 0, 4, 4); @@ -1103,6 +1440,14 @@ void test_pack(void) TEST_FIELD(OUTLINETEXTMETRICW, LPSTR, otmpStyleName, 208, 4, 4); TEST_FIELD(OUTLINETEXTMETRICW, LPSTR, otmpFullName, 212, 4, 4); + /* PABC */ + TEST_TYPE(PABC, 4, 4); + TEST_TYPE_POINTER(PABC, 12, 4); + + /* PABCFLOAT */ + TEST_TYPE(PABCFLOAT, 4, 4); + TEST_TYPE_POINTER(PABCFLOAT, 12, 4); + /* PANOSE (pack 4) */ TEST_TYPE(PANOSE, 10, 1); TEST_FIELD(PANOSE, BYTE, bFamilyType, 0, 1, 1); @@ -1116,6 +1461,69 @@ void test_pack(void) TEST_FIELD(PANOSE, BYTE, bMidline, 8, 1, 1); TEST_FIELD(PANOSE, BYTE, bXHeight, 9, 1, 1); + /* PATTERN */ + TEST_TYPE(PATTERN, 12, 4); + + /* PBITMAP */ + TEST_TYPE(PBITMAP, 4, 4); + TEST_TYPE_POINTER(PBITMAP, 24, 4); + + /* PBITMAPCOREHEADER */ + TEST_TYPE(PBITMAPCOREHEADER, 4, 4); + TEST_TYPE_POINTER(PBITMAPCOREHEADER, 12, 4); + + /* PBITMAPCOREINFO */ + TEST_TYPE(PBITMAPCOREINFO, 4, 4); + TEST_TYPE_POINTER(PBITMAPCOREINFO, 16, 4); + + /* PBITMAPFILEHEADER */ + TEST_TYPE(PBITMAPFILEHEADER, 4, 4); + TEST_TYPE_POINTER(PBITMAPFILEHEADER, 14, 2); + + /* PBITMAPINFO */ + TEST_TYPE(PBITMAPINFO, 4, 4); + TEST_TYPE_POINTER(PBITMAPINFO, 44, 4); + + /* PBITMAPINFOHEADER */ + TEST_TYPE(PBITMAPINFOHEADER, 4, 4); + TEST_TYPE_POINTER(PBITMAPINFOHEADER, 40, 4); + + /* PBITMAPV4HEADER */ + TEST_TYPE(PBITMAPV4HEADER, 4, 4); + TEST_TYPE_POINTER(PBITMAPV4HEADER, 108, 4); + + /* PBITMAPV5HEADER */ + TEST_TYPE(PBITMAPV5HEADER, 4, 4); + TEST_TYPE_POINTER(PBITMAPV5HEADER, 124, 4); + + /* PBLENDFUNCTION */ + TEST_TYPE(PBLENDFUNCTION, 4, 4); + TEST_TYPE_POINTER(PBLENDFUNCTION, 4, 1); + + /* PCHARSETINFO */ + TEST_TYPE(PCHARSETINFO, 4, 4); + TEST_TYPE_POINTER(PCHARSETINFO, 32, 4); + + /* PCOLORADJUSTMENT */ + TEST_TYPE(PCOLORADJUSTMENT, 4, 4); + TEST_TYPE_POINTER(PCOLORADJUSTMENT, 24, 2); + + /* PDEVMODEA */ + TEST_TYPE(PDEVMODEA, 4, 4); + + /* PDEVMODEW */ + TEST_TYPE(PDEVMODEW, 4, 4); + + /* PDIBSECTION */ + TEST_TYPE(PDIBSECTION, 4, 4); + TEST_TYPE_POINTER(PDIBSECTION, 84, 4); + + /* PDISPLAY_DEVICEA */ + TEST_TYPE(PDISPLAY_DEVICEA, 4, 4); + + /* PDISPLAY_DEVICEW */ + TEST_TYPE(PDISPLAY_DEVICEW, 4, 4); + /* PELARRAY (pack 4) */ TEST_TYPE(PELARRAY, 20, 4); TEST_FIELD(PELARRAY, LONG, paXCount, 0, 4, 4); @@ -1124,6 +1532,417 @@ void test_pack(void) TEST_FIELD(PELARRAY, LONG, paYExt, 12, 4, 4); TEST_FIELD(PELARRAY, BYTE, paRGBs, 16, 1, 1); + /* PEMR */ + TEST_TYPE(PEMR, 4, 4); + TEST_TYPE_POINTER(PEMR, 8, 4); + + /* PEMRABORTPATH */ + TEST_TYPE(PEMRABORTPATH, 4, 4); + TEST_TYPE_POINTER(PEMRABORTPATH, 8, 4); + + /* PEMRANGLEARC */ + TEST_TYPE(PEMRANGLEARC, 4, 4); + TEST_TYPE_POINTER(PEMRANGLEARC, 28, 4); + + /* PEMRARC */ + TEST_TYPE(PEMRARC, 4, 4); + TEST_TYPE_POINTER(PEMRARC, 40, 4); + + /* PEMRARCTO */ + TEST_TYPE(PEMRARCTO, 4, 4); + TEST_TYPE_POINTER(PEMRARCTO, 40, 4); + + /* PEMRBEGINPATH */ + TEST_TYPE(PEMRBEGINPATH, 4, 4); + TEST_TYPE_POINTER(PEMRBEGINPATH, 8, 4); + + /* PEMRBITBLT */ + TEST_TYPE(PEMRBITBLT, 4, 4); + TEST_TYPE_POINTER(PEMRBITBLT, 100, 4); + + /* PEMRCHORD */ + TEST_TYPE(PEMRCHORD, 4, 4); + TEST_TYPE_POINTER(PEMRCHORD, 40, 4); + + /* PEMRCLOSEFIGURE */ + TEST_TYPE(PEMRCLOSEFIGURE, 4, 4); + TEST_TYPE_POINTER(PEMRCLOSEFIGURE, 8, 4); + + /* PEMRCREATEBRUSHINDIRECT */ + TEST_TYPE(PEMRCREATEBRUSHINDIRECT, 4, 4); + TEST_TYPE_POINTER(PEMRCREATEBRUSHINDIRECT, 24, 4); + + /* PEMRCREATEDIBPATTERNBRUSHPT */ + TEST_TYPE(PEMRCREATEDIBPATTERNBRUSHPT, 4, 4); + TEST_TYPE_POINTER(PEMRCREATEDIBPATTERNBRUSHPT, 32, 4); + + /* PEMRCREATEMONOBRUSH */ + TEST_TYPE(PEMRCREATEMONOBRUSH, 4, 4); + TEST_TYPE_POINTER(PEMRCREATEMONOBRUSH, 32, 4); + + /* PEMRCREATEPALETTE */ + TEST_TYPE(PEMRCREATEPALETTE, 4, 4); + TEST_TYPE_POINTER(PEMRCREATEPALETTE, 20, 4); + + /* PEMRCREATEPEN */ + TEST_TYPE(PEMRCREATEPEN, 4, 4); + TEST_TYPE_POINTER(PEMRCREATEPEN, 28, 4); + + /* PEMRDELETECOLORSPACE */ + TEST_TYPE(PEMRDELETECOLORSPACE, 4, 4); + TEST_TYPE_POINTER(PEMRDELETECOLORSPACE, 12, 4); + + /* PEMRDELETEOBJECT */ + TEST_TYPE(PEMRDELETEOBJECT, 4, 4); + TEST_TYPE_POINTER(PEMRDELETEOBJECT, 12, 4); + + /* PEMRELLIPSE */ + TEST_TYPE(PEMRELLIPSE, 4, 4); + TEST_TYPE_POINTER(PEMRELLIPSE, 24, 4); + + /* PEMRENDPATH */ + TEST_TYPE(PEMRENDPATH, 4, 4); + TEST_TYPE_POINTER(PEMRENDPATH, 8, 4); + + /* PEMREOF */ + TEST_TYPE(PEMREOF, 4, 4); + TEST_TYPE_POINTER(PEMREOF, 20, 4); + + /* PEMREXCLUDECLIPRECT */ + TEST_TYPE(PEMREXCLUDECLIPRECT, 4, 4); + TEST_TYPE_POINTER(PEMREXCLUDECLIPRECT, 24, 4); + + /* PEMREXTCREATEFONTINDIRECTW */ + TEST_TYPE(PEMREXTCREATEFONTINDIRECTW, 4, 4); + TEST_TYPE_POINTER(PEMREXTCREATEFONTINDIRECTW, 332, 4); + + /* PEMREXTCREATEPEN */ + TEST_TYPE(PEMREXTCREATEPEN, 4, 4); + TEST_TYPE_POINTER(PEMREXTCREATEPEN, 56, 4); + + /* PEMREXTFLOODFILL */ + TEST_TYPE(PEMREXTFLOODFILL, 4, 4); + TEST_TYPE_POINTER(PEMREXTFLOODFILL, 24, 4); + + /* PEMREXTSELECTCLIPRGN */ + TEST_TYPE(PEMREXTSELECTCLIPRGN, 4, 4); + TEST_TYPE_POINTER(PEMREXTSELECTCLIPRGN, 20, 4); + + /* PEMREXTTEXTOUTA */ + TEST_TYPE(PEMREXTTEXTOUTA, 4, 4); + TEST_TYPE_POINTER(PEMREXTTEXTOUTA, 76, 4); + + /* PEMREXTTEXTOUTW */ + TEST_TYPE(PEMREXTTEXTOUTW, 4, 4); + TEST_TYPE_POINTER(PEMREXTTEXTOUTW, 76, 4); + + /* PEMRFILLPATH */ + TEST_TYPE(PEMRFILLPATH, 4, 4); + TEST_TYPE_POINTER(PEMRFILLPATH, 24, 4); + + /* PEMRFILLRGN */ + TEST_TYPE(PEMRFILLRGN, 4, 4); + TEST_TYPE_POINTER(PEMRFILLRGN, 36, 4); + + /* PEMRFLATTENPATH */ + TEST_TYPE(PEMRFLATTENPATH, 4, 4); + TEST_TYPE_POINTER(PEMRFLATTENPATH, 8, 4); + + /* PEMRFORMAT */ + TEST_TYPE(PEMRFORMAT, 4, 4); + TEST_TYPE_POINTER(PEMRFORMAT, 16, 4); + + /* PEMRFRAMERGN */ + TEST_TYPE(PEMRFRAMERGN, 4, 4); + TEST_TYPE_POINTER(PEMRFRAMERGN, 44, 4); + + /* PEMRGDICOMMENT */ + TEST_TYPE(PEMRGDICOMMENT, 4, 4); + TEST_TYPE_POINTER(PEMRGDICOMMENT, 16, 4); + + /* PEMRGLSBOUNDEDRECORD */ + TEST_TYPE(PEMRGLSBOUNDEDRECORD, 4, 4); + TEST_TYPE_POINTER(PEMRGLSBOUNDEDRECORD, 32, 4); + + /* PEMRGLSRECORD */ + TEST_TYPE(PEMRGLSRECORD, 4, 4); + TEST_TYPE_POINTER(PEMRGLSRECORD, 16, 4); + + /* PEMRINTERSECTCLIPRECT */ + TEST_TYPE(PEMRINTERSECTCLIPRECT, 4, 4); + TEST_TYPE_POINTER(PEMRINTERSECTCLIPRECT, 24, 4); + + /* PEMRINVERTRGN */ + TEST_TYPE(PEMRINVERTRGN, 4, 4); + TEST_TYPE_POINTER(PEMRINVERTRGN, 32, 4); + + /* PEMRLINETO */ + TEST_TYPE(PEMRLINETO, 4, 4); + TEST_TYPE_POINTER(PEMRLINETO, 16, 4); + + /* PEMRMASKBLT */ + TEST_TYPE(PEMRMASKBLT, 4, 4); + TEST_TYPE_POINTER(PEMRMASKBLT, 128, 4); + + /* PEMRMODIFYWORLDTRANSFORM */ + TEST_TYPE(PEMRMODIFYWORLDTRANSFORM, 4, 4); + TEST_TYPE_POINTER(PEMRMODIFYWORLDTRANSFORM, 36, 4); + + /* PEMRMOVETOEX */ + TEST_TYPE(PEMRMOVETOEX, 4, 4); + TEST_TYPE_POINTER(PEMRMOVETOEX, 16, 4); + + /* PEMROFFSETCLIPRGN */ + TEST_TYPE(PEMROFFSETCLIPRGN, 4, 4); + TEST_TYPE_POINTER(PEMROFFSETCLIPRGN, 16, 4); + + /* PEMRPAINTRGN */ + TEST_TYPE(PEMRPAINTRGN, 4, 4); + TEST_TYPE_POINTER(PEMRPAINTRGN, 32, 4); + + /* PEMRPIE */ + TEST_TYPE(PEMRPIE, 4, 4); + TEST_TYPE_POINTER(PEMRPIE, 40, 4); + + /* PEMRPIXELFORMAT */ + TEST_TYPE(PEMRPIXELFORMAT, 4, 4); + TEST_TYPE_POINTER(PEMRPIXELFORMAT, 48, 4); + + /* PEMRPLGBLT */ + TEST_TYPE(PEMRPLGBLT, 4, 4); + TEST_TYPE_POINTER(PEMRPLGBLT, 140, 4); + + /* PEMRPOLYBEZIER */ + TEST_TYPE(PEMRPOLYBEZIER, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYBEZIER, 36, 4); + + /* PEMRPOLYBEZIERTO */ + TEST_TYPE(PEMRPOLYBEZIERTO, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYBEZIERTO, 36, 4); + + /* PEMRPOLYDRAW */ + TEST_TYPE(PEMRPOLYDRAW, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYDRAW, 40, 4); + + /* PEMRPOLYGON */ + TEST_TYPE(PEMRPOLYGON, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYGON, 36, 4); + + /* PEMRPOLYLINE */ + TEST_TYPE(PEMRPOLYLINE, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYLINE, 36, 4); + + /* PEMRPOLYLINETO */ + TEST_TYPE(PEMRPOLYLINETO, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYLINETO, 36, 4); + + /* PEMRPOLYPOLYGON */ + TEST_TYPE(PEMRPOLYPOLYGON, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYPOLYGON, 44, 4); + + /* PEMRPOLYPOLYLINE */ + TEST_TYPE(PEMRPOLYPOLYLINE, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYPOLYLINE, 44, 4); + + /* PEMRPOLYTEXTOUTA */ + TEST_TYPE(PEMRPOLYTEXTOUTA, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYTEXTOUTA, 80, 4); + + /* PEMRPOLYTEXTOUTW */ + TEST_TYPE(PEMRPOLYTEXTOUTW, 4, 4); + TEST_TYPE_POINTER(PEMRPOLYTEXTOUTW, 80, 4); + + /* PEMRREALIZEPALETTE */ + TEST_TYPE(PEMRREALIZEPALETTE, 4, 4); + TEST_TYPE_POINTER(PEMRREALIZEPALETTE, 8, 4); + + /* PEMRRECTANGLE */ + TEST_TYPE(PEMRRECTANGLE, 4, 4); + TEST_TYPE_POINTER(PEMRRECTANGLE, 24, 4); + + /* PEMRRESIZEPALETTE */ + TEST_TYPE(PEMRRESIZEPALETTE, 4, 4); + TEST_TYPE_POINTER(PEMRRESIZEPALETTE, 16, 4); + + /* PEMRRESTOREDC */ + TEST_TYPE(PEMRRESTOREDC, 4, 4); + TEST_TYPE_POINTER(PEMRRESTOREDC, 12, 4); + + /* PEMRROUNDRECT */ + TEST_TYPE(PEMRROUNDRECT, 4, 4); + TEST_TYPE_POINTER(PEMRROUNDRECT, 32, 4); + + /* PEMRSAVEDC */ + TEST_TYPE(PEMRSAVEDC, 4, 4); + TEST_TYPE_POINTER(PEMRSAVEDC, 8, 4); + + /* PEMRSCALEVIEWPORTEXTEX */ + TEST_TYPE(PEMRSCALEVIEWPORTEXTEX, 4, 4); + TEST_TYPE_POINTER(PEMRSCALEVIEWPORTEXTEX, 24, 4); + + /* PEMRSCALEWINDOWEXTEX */ + TEST_TYPE(PEMRSCALEWINDOWEXTEX, 4, 4); + TEST_TYPE_POINTER(PEMRSCALEWINDOWEXTEX, 24, 4); + + /* PEMRSELECTCLIPPATH */ + TEST_TYPE(PEMRSELECTCLIPPATH, 4, 4); + TEST_TYPE_POINTER(PEMRSELECTCLIPPATH, 12, 4); + + /* PEMRSELECTCOLORSPACE */ + TEST_TYPE(PEMRSELECTCOLORSPACE, 4, 4); + TEST_TYPE_POINTER(PEMRSELECTCOLORSPACE, 12, 4); + + /* PEMRSELECTOBJECT */ + TEST_TYPE(PEMRSELECTOBJECT, 4, 4); + TEST_TYPE_POINTER(PEMRSELECTOBJECT, 12, 4); + + /* PEMRSELECTPALETTE */ + TEST_TYPE(PEMRSELECTPALETTE, 4, 4); + TEST_TYPE_POINTER(PEMRSELECTPALETTE, 12, 4); + + /* PEMRSETARCDIRECTION */ + TEST_TYPE(PEMRSETARCDIRECTION, 4, 4); + TEST_TYPE_POINTER(PEMRSETARCDIRECTION, 12, 4); + + /* PEMRSETBKCOLOR */ + TEST_TYPE(PEMRSETBKCOLOR, 4, 4); + TEST_TYPE_POINTER(PEMRSETBKCOLOR, 12, 4); + + /* PEMRSETBKMODE */ + TEST_TYPE(PEMRSETBKMODE, 4, 4); + TEST_TYPE_POINTER(PEMRSETBKMODE, 12, 4); + + /* PEMRSETBRUSHORGEX */ + TEST_TYPE(PEMRSETBRUSHORGEX, 4, 4); + TEST_TYPE_POINTER(PEMRSETBRUSHORGEX, 16, 4); + + /* PEMRSETCOLORADJUSTMENT */ + TEST_TYPE(PEMRSETCOLORADJUSTMENT, 4, 4); + TEST_TYPE_POINTER(PEMRSETCOLORADJUSTMENT, 32, 4); + + /* PEMRSETDIBITSTODEVICE */ + TEST_TYPE(PEMRSETDIBITSTODEVICE, 4, 4); + TEST_TYPE_POINTER(PEMRSETDIBITSTODEVICE, 76, 4); + + /* PEMRSETMAPMODE */ + TEST_TYPE(PEMRSETMAPMODE, 4, 4); + TEST_TYPE_POINTER(PEMRSETMAPMODE, 12, 4); + + /* PEMRSETMAPPERFLAGS */ + TEST_TYPE(PEMRSETMAPPERFLAGS, 4, 4); + TEST_TYPE_POINTER(PEMRSETMAPPERFLAGS, 12, 4); + + /* PEMRSETMETARGN */ + TEST_TYPE(PEMRSETMETARGN, 4, 4); + TEST_TYPE_POINTER(PEMRSETMETARGN, 8, 4); + + /* PEMRSETMITERLIMIT */ + TEST_TYPE(PEMRSETMITERLIMIT, 4, 4); + TEST_TYPE_POINTER(PEMRSETMITERLIMIT, 12, 4); + + /* PEMRSETPALETTEENTRIES */ + TEST_TYPE(PEMRSETPALETTEENTRIES, 4, 4); + TEST_TYPE_POINTER(PEMRSETPALETTEENTRIES, 24, 4); + + /* PEMRSETPIXELV */ + TEST_TYPE(PEMRSETPIXELV, 4, 4); + TEST_TYPE_POINTER(PEMRSETPIXELV, 20, 4); + + /* PEMRSETPOLYFILLMODE */ + TEST_TYPE(PEMRSETPOLYFILLMODE, 4, 4); + TEST_TYPE_POINTER(PEMRSETPOLYFILLMODE, 12, 4); + + /* PEMRSETROP2 */ + TEST_TYPE(PEMRSETROP2, 4, 4); + TEST_TYPE_POINTER(PEMRSETROP2, 12, 4); + + /* PEMRSETSTRETCHBLTMODE */ + TEST_TYPE(PEMRSETSTRETCHBLTMODE, 4, 4); + TEST_TYPE_POINTER(PEMRSETSTRETCHBLTMODE, 12, 4); + + /* PEMRSETTEXTALIGN */ + TEST_TYPE(PEMRSETTEXTALIGN, 4, 4); + TEST_TYPE_POINTER(PEMRSETTEXTALIGN, 12, 4); + + /* PEMRSETTEXTCOLOR */ + TEST_TYPE(PEMRSETTEXTCOLOR, 4, 4); + TEST_TYPE_POINTER(PEMRSETTEXTCOLOR, 12, 4); + + /* PEMRSETVIEWPORTEXTEX */ + TEST_TYPE(PEMRSETVIEWPORTEXTEX, 4, 4); + TEST_TYPE_POINTER(PEMRSETVIEWPORTEXTEX, 16, 4); + + /* PEMRSETVIEWPORTORGEX */ + TEST_TYPE(PEMRSETVIEWPORTORGEX, 4, 4); + TEST_TYPE_POINTER(PEMRSETVIEWPORTORGEX, 16, 4); + + /* PEMRSETWINDOWEXTEX */ + TEST_TYPE(PEMRSETWINDOWEXTEX, 4, 4); + TEST_TYPE_POINTER(PEMRSETWINDOWEXTEX, 16, 4); + + /* PEMRSETWINDOWORGEX */ + TEST_TYPE(PEMRSETWINDOWORGEX, 4, 4); + TEST_TYPE_POINTER(PEMRSETWINDOWORGEX, 16, 4); + + /* PEMRSETWORLDTRANSFORM */ + TEST_TYPE(PEMRSETWORLDTRANSFORM, 4, 4); + TEST_TYPE_POINTER(PEMRSETWORLDTRANSFORM, 32, 4); + + /* PEMRSTRETCHBLT */ + TEST_TYPE(PEMRSTRETCHBLT, 4, 4); + TEST_TYPE_POINTER(PEMRSTRETCHBLT, 108, 4); + + /* PEMRSTRETCHDIBITS */ + TEST_TYPE(PEMRSTRETCHDIBITS, 4, 4); + TEST_TYPE_POINTER(PEMRSTRETCHDIBITS, 80, 4); + + /* PEMRSTROKEANDFILLPATH */ + TEST_TYPE(PEMRSTROKEANDFILLPATH, 4, 4); + TEST_TYPE_POINTER(PEMRSTROKEANDFILLPATH, 24, 4); + + /* PEMRSTROKEPATH */ + TEST_TYPE(PEMRSTROKEPATH, 4, 4); + TEST_TYPE_POINTER(PEMRSTROKEPATH, 24, 4); + + /* PEMRTEXT */ + TEST_TYPE(PEMRTEXT, 4, 4); + TEST_TYPE_POINTER(PEMRTEXT, 40, 4); + + /* PEMRWIDENPATH */ + TEST_TYPE(PEMRWIDENPATH, 4, 4); + TEST_TYPE_POINTER(PEMRWIDENPATH, 8, 4); + + /* PENHMETAHEADER */ + TEST_TYPE(PENHMETAHEADER, 4, 4); + + /* PEXTLOGFONTA */ + TEST_TYPE(PEXTLOGFONTA, 4, 4); + TEST_TYPE_POINTER(PEXTLOGFONTA, 192, 4); + + /* PEXTLOGFONTW */ + TEST_TYPE(PEXTLOGFONTW, 4, 4); + TEST_TYPE_POINTER(PEXTLOGFONTW, 320, 4); + + /* PEXTLOGPEN */ + TEST_TYPE(PEXTLOGPEN, 4, 4); + TEST_TYPE_POINTER(PEXTLOGPEN, 28, 4); + + /* PFONTSIGNATURE */ + TEST_TYPE(PFONTSIGNATURE, 4, 4); + TEST_TYPE_POINTER(PFONTSIGNATURE, 24, 4); + + /* PGRADIENT_RECT */ + TEST_TYPE(PGRADIENT_RECT, 4, 4); + TEST_TYPE_POINTER(PGRADIENT_RECT, 8, 4); + + /* PGRADIENT_TRIANGLE */ + TEST_TYPE(PGRADIENT_TRIANGLE, 4, 4); + TEST_TYPE_POINTER(PGRADIENT_TRIANGLE, 12, 4); + + /* PHANDLETABLE */ + TEST_TYPE(PHANDLETABLE, 4, 4); + TEST_TYPE_POINTER(PHANDLETABLE, 4, 4); + /* PIXELFORMATDESCRIPTOR (pack 4) */ TEST_TYPE(PIXELFORMATDESCRIPTOR, 40, 4); TEST_FIELD(PIXELFORMATDESCRIPTOR, WORD, nSize, 0, 2, 2); @@ -1153,6 +1972,34 @@ void test_pack(void) TEST_FIELD(PIXELFORMATDESCRIPTOR, DWORD, dwVisibleMask, 32, 4, 4); TEST_FIELD(PIXELFORMATDESCRIPTOR, DWORD, dwDamageMask, 36, 4, 4); + /* PLOGBRUSH */ + TEST_TYPE(PLOGBRUSH, 4, 4); + TEST_TYPE_POINTER(PLOGBRUSH, 12, 4); + + /* PLOGFONTA */ + TEST_TYPE(PLOGFONTA, 4, 4); + TEST_TYPE_POINTER(PLOGFONTA, 60, 4); + + /* PLOGFONTW */ + TEST_TYPE(PLOGFONTW, 4, 4); + TEST_TYPE_POINTER(PLOGFONTW, 92, 4); + + /* PMETAHEADER */ + TEST_TYPE(PMETAHEADER, 4, 4); + TEST_TYPE_POINTER(PMETAHEADER, 18, 2); + + /* PMETARECORD */ + TEST_TYPE(PMETARECORD, 4, 4); + TEST_TYPE_POINTER(PMETARECORD, 8, 4); + + /* PNEWTEXTMETRICA */ + TEST_TYPE(PNEWTEXTMETRICA, 4, 4); + TEST_TYPE_POINTER(PNEWTEXTMETRICA, 72, 4); + + /* PNEWTEXTMETRICW */ + TEST_TYPE(PNEWTEXTMETRICW, 4, 4); + TEST_TYPE_POINTER(PNEWTEXTMETRICW, 76, 4); + /* POINTFX (pack 4) */ TEST_TYPE(POINTFX, 8, 2); TEST_FIELD(POINTFX, FIXED, x, 0, 4, 2); @@ -1178,6 +2025,54 @@ void test_pack(void) TEST_FIELD(POLYTEXTW, RECT, rcl, 20, 16, 4); TEST_FIELD(POLYTEXTW, INT *, pdx, 36, 4, 4); + /* POUTLINETEXTMETRICA */ + TEST_TYPE(POUTLINETEXTMETRICA, 4, 4); + TEST_TYPE_POINTER(POUTLINETEXTMETRICA, 212, 4); + + /* POUTLINETEXTMETRICW */ + TEST_TYPE(POUTLINETEXTMETRICW, 4, 4); + TEST_TYPE_POINTER(POUTLINETEXTMETRICW, 216, 4); + + /* PPELARRAY */ + TEST_TYPE(PPELARRAY, 4, 4); + TEST_TYPE_POINTER(PPELARRAY, 20, 4); + + /* PPIXELFORMATDESCRIPTOR */ + TEST_TYPE(PPIXELFORMATDESCRIPTOR, 4, 4); + TEST_TYPE_POINTER(PPIXELFORMATDESCRIPTOR, 40, 4); + + /* PPOLYTEXTA */ + TEST_TYPE(PPOLYTEXTA, 4, 4); + TEST_TYPE_POINTER(PPOLYTEXTA, 40, 4); + + /* PPOLYTEXTW */ + TEST_TYPE(PPOLYTEXTW, 4, 4); + TEST_TYPE_POINTER(PPOLYTEXTW, 40, 4); + + /* PRGNDATA */ + TEST_TYPE(PRGNDATA, 4, 4); + TEST_TYPE_POINTER(PRGNDATA, 36, 4); + + /* PRGNDATAHEADER */ + TEST_TYPE(PRGNDATAHEADER, 4, 4); + TEST_TYPE_POINTER(PRGNDATAHEADER, 32, 4); + + /* PTEXTMETRICA */ + TEST_TYPE(PTEXTMETRICA, 4, 4); + TEST_TYPE_POINTER(PTEXTMETRICA, 56, 4); + + /* PTEXTMETRICW */ + TEST_TYPE(PTEXTMETRICW, 4, 4); + TEST_TYPE_POINTER(PTEXTMETRICW, 60, 4); + + /* PTRIVERTEX */ + TEST_TYPE(PTRIVERTEX, 4, 4); + TEST_TYPE_POINTER(PTRIVERTEX, 16, 4); + + /* PXFORM */ + TEST_TYPE(PXFORM, 4, 4); + TEST_TYPE_POINTER(PXFORM, 24, 4); + /* RASTERIZER_STATUS (pack 4) */ TEST_TYPE(RASTERIZER_STATUS, 6, 2); TEST_FIELD(RASTERIZER_STATUS, SHORT, nSize, 0, 2, 2); diff --git a/dlls/kernel/tests/generated.c b/dlls/kernel/tests/generated.c index 5c977bee444..a8bc0c53443 100644 --- a/dlls/kernel/tests/generated.c +++ b/dlls/kernel/tests/generated.c @@ -34,6 +34,22 @@ /* FIXME: Not sure if is possible to do without compiler extension */ #endif +#if (_MSC_VER >= 1300) && defined(__cplusplus) +# define _TYPE_ALIGNMENT(type) __alignof(type) +#elif defined(__GNUC__) +# define _TYPE_ALIGNMENT(type) __alignof__(type) +#else +/* + * FIXME: Not sure if is possible to do without compiler extension + * (if type is not just a name that is, if so the normal) + * TYPE_ALIGNMENT can be used) + */ +#endif + +#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) +# define TYPE_ALIGNMENT _TYPE_ALIGNMENT +#endif + /*********************************************************************** * Test helper macros */ @@ -52,8 +68,19 @@ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \ FIELD_OFFSET(type, field)) +#ifdef _TYPE_ALIGNMENT +#define TEST__TYPE_ALIGNMENT(type, align) \ + ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _TYPE_ALIGNMENT(type)) +#else +# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) +#endif + +#ifdef TYPE_ALIGNMENT #define TEST_TYPE_ALIGNMENT(type, align) \ ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", TYPE_ALIGNMENT(type)) +#else +# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) +#endif #define TEST_TYPE_SIZE(type, size) \ ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")", sizeof(type)) @@ -71,6 +98,16 @@ TEST_TYPE_ALIGNMENT(type, align); \ TEST_TYPE_SIZE(type, size) +#define TEST_TYPE_POINTER(type, size, align) \ + TEST__TYPE_ALIGNMENT(*(type)0, align); \ + TEST_TYPE_SIZE(*(type)0, size) + +#define TEST_TYPE_SIGNED(type) \ + ok((type) -1 < 0, "(" #type ") -1 < 0"); + +#define TEST_TYPE_UNSIGNED(type) \ + ok((type) -1 > 0, "(" #type ") -1 > 0"); + void test_pack(void) { /* BY_HANDLE_FILE_INFORMATION (pack 4) */ @@ -87,15 +124,9 @@ void test_pack(void) TEST_FIELD(BY_HANDLE_FILE_INFORMATION, DWORD, nFileIndexLow, 48, 4, 4); /* COMMCONFIG (pack 4) */ - TEST_TYPE(COMMCONFIG, 52, 4); TEST_FIELD(COMMCONFIG, DWORD, dwSize, 0, 4, 4); TEST_FIELD(COMMCONFIG, WORD, wVersion, 4, 2, 2); TEST_FIELD(COMMCONFIG, WORD, wReserved, 6, 2, 2); - TEST_FIELD(COMMCONFIG, DCB, dcb, 8, 28, 4); - TEST_FIELD(COMMCONFIG, DWORD, dwProviderSubType, 36, 4, 4); - TEST_FIELD(COMMCONFIG, DWORD, dwProviderOffset, 40, 4, 4); - TEST_FIELD(COMMCONFIG, DWORD, dwProviderSize, 44, 4, 4); - TEST_FIELD(COMMCONFIG, DWORD[1], wcProviderData, 48, 4, 4); /* COMMPROP (pack 4) */ TEST_TYPE(COMMPROP, 64, 4); @@ -150,27 +181,33 @@ void test_pack(void) TEST_FIELD(CREATE_THREAD_DEBUG_INFO, LPVOID, lpThreadLocalBase, 4, 4, 4); TEST_FIELD(CREATE_THREAD_DEBUG_INFO, LPTHREAD_START_ROUTINE, lpStartAddress, 8, 4, 4); + /* CRITICAL_SECTION */ + TEST_TYPE(CRITICAL_SECTION, 24, 4); + + /* CRITICAL_SECTION_DEBUG */ + TEST_TYPE(CRITICAL_SECTION_DEBUG, 32, 4); + /* DCB (pack 4) */ - TEST_TYPE(DCB, 28, 4); TEST_FIELD(DCB, DWORD, DCBlength, 0, 4, 4); TEST_FIELD(DCB, DWORD, BaudRate, 4, 4, 4); - TEST_FIELD(DCB, WORD, wReserved, 12, 2, 2); - TEST_FIELD(DCB, WORD, XonLim, 14, 2, 2); - TEST_FIELD(DCB, WORD, XoffLim, 16, 2, 2); - TEST_FIELD(DCB, BYTE, ByteSize, 18, 1, 1); - TEST_FIELD(DCB, BYTE, Parity, 19, 1, 1); - TEST_FIELD(DCB, BYTE, StopBits, 20, 1, 1); - TEST_FIELD(DCB, char, XonChar, 21, 1, 1); - TEST_FIELD(DCB, char, XoffChar, 22, 1, 1); - TEST_FIELD(DCB, char, ErrorChar, 23, 1, 1); - TEST_FIELD(DCB, char, EofChar, 24, 1, 1); - TEST_FIELD(DCB, char, EvtChar, 25, 1, 1); /* DEBUG_EVENT (pack 4) */ TEST_FIELD(DEBUG_EVENT, DWORD, dwDebugEventCode, 0, 4, 4); TEST_FIELD(DEBUG_EVENT, DWORD, dwProcessId, 4, 4, 4); TEST_FIELD(DEBUG_EVENT, DWORD, dwThreadId, 8, 4, 4); + /* ENUMRESLANGPROCA */ + + /* ENUMRESLANGPROCW */ + + /* ENUMRESNAMEPROCA */ + + /* ENUMRESNAMEPROCW */ + + /* ENUMRESTYPEPROCA */ + + /* ENUMRESTYPEPROCW */ + /* EXCEPTION_DEBUG_INFO (pack 4) */ TEST_TYPE(EXCEPTION_DEBUG_INFO, 84, 4); TEST_FIELD(EXCEPTION_DEBUG_INFO, EXCEPTION_RECORD, ExceptionRecord, 0, 80, 4); @@ -203,6 +240,141 @@ void test_pack(void) TEST_FIELD(LOAD_DLL_DEBUG_INFO, LPVOID, lpImageName, 16, 4, 4); TEST_FIELD(LOAD_DLL_DEBUG_INFO, WORD, fUnicode, 20, 2, 2); + /* LPBY_HANDLE_FILE_INFORMATION */ + TEST_TYPE(LPBY_HANDLE_FILE_INFORMATION, 4, 4); + TEST_TYPE_POINTER(LPBY_HANDLE_FILE_INFORMATION, 52, 4); + + /* LPCOMMCONFIG */ + TEST_TYPE(LPCOMMCONFIG, 4, 4); + + /* LPCOMMPROP */ + TEST_TYPE(LPCOMMPROP, 4, 4); + TEST_TYPE_POINTER(LPCOMMPROP, 64, 4); + + /* LPCOMMTIMEOUTS */ + TEST_TYPE(LPCOMMTIMEOUTS, 4, 4); + TEST_TYPE_POINTER(LPCOMMTIMEOUTS, 20, 4); + + /* LPCOMSTAT */ + TEST_TYPE(LPCOMSTAT, 4, 4); + TEST_TYPE_POINTER(LPCOMSTAT, 12, 4); + + /* LPCONTEXT */ + TEST_TYPE(LPCONTEXT, 4, 4); + + /* LPCRITICAL_SECTION */ + TEST_TYPE(LPCRITICAL_SECTION, 4, 4); + + /* LPCRITICAL_SECTION_DEBUG */ + TEST_TYPE(LPCRITICAL_SECTION_DEBUG, 4, 4); + + /* LPDCB */ + TEST_TYPE(LPDCB, 4, 4); + + /* LPDEBUG_EVENT */ + TEST_TYPE(LPDEBUG_EVENT, 4, 4); + + /* LPEXCEPTION_POINTERS */ + TEST_TYPE(LPEXCEPTION_POINTERS, 4, 4); + + /* LPEXCEPTION_RECORD */ + TEST_TYPE(LPEXCEPTION_RECORD, 4, 4); + + /* LPFIBER_START_ROUTINE */ + + /* LPHW_PROFILE_INFOA */ + TEST_TYPE(LPHW_PROFILE_INFOA, 4, 4); + TEST_TYPE_POINTER(LPHW_PROFILE_INFOA, 124, 4); + + /* LPHW_PROFILE_INFOW */ + TEST_TYPE(LPHW_PROFILE_INFOW, 4, 4); + TEST_TYPE_POINTER(LPHW_PROFILE_INFOW, 244, 4); + + /* LPLDT_ENTRY */ + TEST_TYPE(LPLDT_ENTRY, 4, 4); + + /* LPMEMORYSTATUS */ + TEST_TYPE(LPMEMORYSTATUS, 4, 4); + TEST_TYPE_POINTER(LPMEMORYSTATUS, 32, 4); + + /* LPOFSTRUCT */ + TEST_TYPE(LPOFSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPOFSTRUCT, 136, 2); + + /* LPOSVERSIONINFOA */ + TEST_TYPE(LPOSVERSIONINFOA, 4, 4); + TEST_TYPE_POINTER(LPOSVERSIONINFOA, 148, 4); + + /* LPOSVERSIONINFOEXA */ + TEST_TYPE(LPOSVERSIONINFOEXA, 4, 4); + + /* LPOSVERSIONINFOEXW */ + TEST_TYPE(LPOSVERSIONINFOEXW, 4, 4); + + /* LPOSVERSIONINFOW */ + TEST_TYPE(LPOSVERSIONINFOW, 4, 4); + TEST_TYPE_POINTER(LPOSVERSIONINFOW, 276, 4); + + /* LPOVERLAPPED */ + TEST_TYPE(LPOVERLAPPED, 4, 4); + TEST_TYPE_POINTER(LPOVERLAPPED, 20, 4); + + /* LPOVERLAPPED_COMPLETION_ROUTINE */ + + /* LPPROCESS_HEAP_ENTRY */ + TEST_TYPE(LPPROCESS_HEAP_ENTRY, 4, 4); + + /* LPPROCESS_INFORMATION */ + TEST_TYPE(LPPROCESS_INFORMATION, 4, 4); + TEST_TYPE_POINTER(LPPROCESS_INFORMATION, 16, 4); + + /* LPPROGRESS_ROUTINE */ + + /* LPSECURITY_ATTRIBUTES */ + TEST_TYPE(LPSECURITY_ATTRIBUTES, 4, 4); + TEST_TYPE_POINTER(LPSECURITY_ATTRIBUTES, 12, 4); + + /* LPSTARTUPINFOA */ + TEST_TYPE(LPSTARTUPINFOA, 4, 4); + TEST_TYPE_POINTER(LPSTARTUPINFOA, 68, 4); + + /* LPSTARTUPINFOW */ + TEST_TYPE(LPSTARTUPINFOW, 4, 4); + TEST_TYPE_POINTER(LPSTARTUPINFOW, 68, 4); + + /* LPSYSTEMTIME */ + TEST_TYPE(LPSYSTEMTIME, 4, 4); + TEST_TYPE_POINTER(LPSYSTEMTIME, 16, 2); + + /* LPSYSTEM_INFO */ + TEST_TYPE(LPSYSTEM_INFO, 4, 4); + + /* LPSYSTEM_POWER_STATUS */ + TEST_TYPE(LPSYSTEM_POWER_STATUS, 4, 4); + TEST_TYPE_POINTER(LPSYSTEM_POWER_STATUS, 12, 4); + + /* LPTHREAD_START_ROUTINE */ + + /* LPTIME_ZONE_INFORMATION */ + TEST_TYPE(LPTIME_ZONE_INFORMATION, 4, 4); + TEST_TYPE_POINTER(LPTIME_ZONE_INFORMATION, 172, 4); + + /* LPWIN32_FILE_ATTRIBUTE_DATA */ + TEST_TYPE(LPWIN32_FILE_ATTRIBUTE_DATA, 4, 4); + TEST_TYPE_POINTER(LPWIN32_FILE_ATTRIBUTE_DATA, 36, 4); + + /* LPWIN32_FIND_DATAA */ + TEST_TYPE(LPWIN32_FIND_DATAA, 4, 4); + TEST_TYPE_POINTER(LPWIN32_FIND_DATAA, 320, 4); + + /* LPWIN32_FIND_DATAW */ + TEST_TYPE(LPWIN32_FIND_DATAW, 4, 4); + TEST_TYPE_POINTER(LPWIN32_FIND_DATAW, 592, 4); + + /* LPWIN32_STREAM_ID */ + TEST_TYPE(LPWIN32_STREAM_ID, 4, 4); + TEST_TYPE_POINTER(LPWIN32_STREAM_ID, 24, 4); + /* MEMORYSTATUS (pack 4) */ TEST_TYPE(MEMORYSTATUS, 32, 4); TEST_FIELD(MEMORYSTATUS, DWORD, dwLength, 0, 4, 4); @@ -232,7 +404,7 @@ void test_pack(void) TEST_FIELD(OSVERSIONINFOA, DWORD, dwPlatformId, 16, 4, 4); TEST_FIELD(OSVERSIONINFOA, CHAR[128], szCSDVersion, 20, 128, 1); - /* OSVERSIONINFOEXA */ + /* OSVERSIONINFOEXA (pack 4) */ TEST_FIELD(OSVERSIONINFOEXA, DWORD, dwOSVersionInfoSize, 0, 4, 4); TEST_FIELD(OSVERSIONINFOEXA, DWORD, dwMajorVersion, 4, 4, 4); TEST_FIELD(OSVERSIONINFOEXA, DWORD, dwMinorVersion, 8, 4, 4); @@ -242,7 +414,7 @@ void test_pack(void) TEST_FIELD(OSVERSIONINFOEXA, WORD, wServicePackMajor, 148, 2, 2); TEST_FIELD(OSVERSIONINFOEXA, WORD, wServicePackMinor, 150, 2, 2); - /* OSVERSIONINFOEXW */ + /* OSVERSIONINFOEXW (pack 4) */ TEST_FIELD(OSVERSIONINFOEXW, DWORD, dwOSVersionInfoSize, 0, 4, 4); TEST_FIELD(OSVERSIONINFOEXW, DWORD, dwMajorVersion, 4, 4, 4); TEST_FIELD(OSVERSIONINFOEXW, DWORD, dwMinorVersion, 8, 4, 4); @@ -275,6 +447,45 @@ void test_pack(void) TEST_FIELD(OVERLAPPED, DWORD, OffsetHigh, 12, 4, 4); TEST_FIELD(OVERLAPPED, HANDLE, hEvent, 16, 4, 4); + /* PAPCFUNC */ + + /* PBY_HANDLE_FILE_INFORMATION */ + TEST_TYPE(PBY_HANDLE_FILE_INFORMATION, 4, 4); + TEST_TYPE_POINTER(PBY_HANDLE_FILE_INFORMATION, 52, 4); + + /* PCRITICAL_SECTION */ + TEST_TYPE(PCRITICAL_SECTION, 4, 4); + + /* PCRITICAL_SECTION_DEBUG */ + TEST_TYPE(PCRITICAL_SECTION_DEBUG, 4, 4); + + /* PFIBER_START_ROUTINE */ + + /* POFSTRUCT */ + TEST_TYPE(POFSTRUCT, 4, 4); + TEST_TYPE_POINTER(POFSTRUCT, 136, 2); + + /* POSVERSIONINFOA */ + TEST_TYPE(POSVERSIONINFOA, 4, 4); + TEST_TYPE_POINTER(POSVERSIONINFOA, 148, 4); + + /* POSVERSIONINFOEXA */ + TEST_TYPE(POSVERSIONINFOEXA, 4, 4); + + /* POSVERSIONINFOEXW */ + TEST_TYPE(POSVERSIONINFOEXW, 4, 4); + + /* POSVERSIONINFOW */ + TEST_TYPE(POSVERSIONINFOW, 4, 4); + TEST_TYPE_POINTER(POSVERSIONINFOW, 276, 4); + + /* PPROCESS_HEAP_ENTRY */ + TEST_TYPE(PPROCESS_HEAP_ENTRY, 4, 4); + + /* PPROCESS_INFORMATION */ + TEST_TYPE(PPROCESS_INFORMATION, 4, 4); + TEST_TYPE_POINTER(PPROCESS_INFORMATION, 16, 4); + /* PROCESS_HEAP_ENTRY (pack 4) */ TEST_FIELD(PROCESS_HEAP_ENTRY, LPVOID, lpData, 0, 4, 4); TEST_FIELD(PROCESS_HEAP_ENTRY, DWORD, cbData, 4, 4, 4); @@ -289,6 +500,28 @@ void test_pack(void) TEST_FIELD(PROCESS_INFORMATION, DWORD, dwProcessId, 8, 4, 4); TEST_FIELD(PROCESS_INFORMATION, DWORD, dwThreadId, 12, 4, 4); + /* PSECURITY_ATTRIBUTES */ + TEST_TYPE(PSECURITY_ATTRIBUTES, 4, 4); + TEST_TYPE_POINTER(PSECURITY_ATTRIBUTES, 12, 4); + + /* PSYSTEMTIME */ + TEST_TYPE(PSYSTEMTIME, 4, 4); + TEST_TYPE_POINTER(PSYSTEMTIME, 16, 2); + + /* PTIMERAPCROUTINE */ + + /* PTIME_ZONE_INFORMATION */ + TEST_TYPE(PTIME_ZONE_INFORMATION, 4, 4); + TEST_TYPE_POINTER(PTIME_ZONE_INFORMATION, 172, 4); + + /* PWIN32_FIND_DATAA */ + TEST_TYPE(PWIN32_FIND_DATAA, 4, 4); + TEST_TYPE_POINTER(PWIN32_FIND_DATAA, 320, 4); + + /* PWIN32_FIND_DATAW */ + TEST_TYPE(PWIN32_FIND_DATAW, 4, 4); + TEST_TYPE_POINTER(PWIN32_FIND_DATAW, 592, 4); + /* RIP_INFO (pack 4) */ TEST_TYPE(RIP_INFO, 8, 4); TEST_FIELD(RIP_INFO, DWORD, dwError, 0, 4, 4); @@ -376,6 +609,8 @@ void test_pack(void) TEST_TYPE(UNLOAD_DLL_DEBUG_INFO, 4, 4); TEST_FIELD(UNLOAD_DLL_DEBUG_INFO, LPVOID, lpBaseOfDll, 0, 4, 4); + /* WAITORTIMERCALLBACK */ + /* WIN32_FILE_ATTRIBUTE_DATA (pack 4) */ TEST_TYPE(WIN32_FILE_ATTRIBUTE_DATA, 36, 4); TEST_FIELD(WIN32_FILE_ATTRIBUTE_DATA, DWORD, dwFileAttributes, 0, 4, 4); @@ -411,14 +646,6 @@ void test_pack(void) TEST_FIELD(WIN32_FIND_DATAW, WCHAR[260], cFileName, 44, 520, 2); TEST_FIELD(WIN32_FIND_DATAW, WCHAR[14], cAlternateFileName, 564, 28, 2); - /* WIN32_STREAM_ID (pack 4) */ - TEST_TYPE(WIN32_STREAM_ID, 24, 4); - TEST_FIELD(WIN32_STREAM_ID, DWORD, dwStreamId, 0, 4, 4); - TEST_FIELD(WIN32_STREAM_ID, DWORD, dwStreamAttributes, 4, 4, 4); - TEST_FIELD(WIN32_STREAM_ID, LARGE_INTEGER, Size, 8, 8, 4); - TEST_FIELD(WIN32_STREAM_ID, DWORD, dwStreamNameSize, 16, 4, 4); - TEST_FIELD(WIN32_STREAM_ID, WCHAR[ANYSIZE_ARRAY], cStreamName, 20, 2, 2); - } START_TEST(generated) diff --git a/dlls/ntdll/tests/generated.c b/dlls/ntdll/tests/generated.c index 48d3d23df5b..1ef3ab20302 100644 --- a/dlls/ntdll/tests/generated.c +++ b/dlls/ntdll/tests/generated.c @@ -34,6 +34,22 @@ /* FIXME: Not sure if is possible to do without compiler extension */ #endif +#if (_MSC_VER >= 1300) && defined(__cplusplus) +# define _TYPE_ALIGNMENT(type) __alignof(type) +#elif defined(__GNUC__) +# define _TYPE_ALIGNMENT(type) __alignof__(type) +#else +/* + * FIXME: Not sure if is possible to do without compiler extension + * (if type is not just a name that is, if so the normal) + * TYPE_ALIGNMENT can be used) + */ +#endif + +#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) +# define TYPE_ALIGNMENT _TYPE_ALIGNMENT +#endif + /*********************************************************************** * Test helper macros */ @@ -52,8 +68,19 @@ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \ FIELD_OFFSET(type, field)) +#ifdef _TYPE_ALIGNMENT +#define TEST__TYPE_ALIGNMENT(type, align) \ + ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _TYPE_ALIGNMENT(type)) +#else +# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) +#endif + +#ifdef TYPE_ALIGNMENT #define TEST_TYPE_ALIGNMENT(type, align) \ ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", TYPE_ALIGNMENT(type)) +#else +# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) +#endif #define TEST_TYPE_SIZE(type, size) \ ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")", sizeof(type)) @@ -71,8 +98,43 @@ TEST_TYPE_ALIGNMENT(type, align); \ TEST_TYPE_SIZE(type, size) +#define TEST_TYPE_POINTER(type, size, align) \ + TEST__TYPE_ALIGNMENT(*(type)0, align); \ + TEST_TYPE_SIZE(*(type)0, size) + +#define TEST_TYPE_SIGNED(type) \ + ok((type) -1 < 0, "(" #type ") -1 < 0"); + +#define TEST_TYPE_UNSIGNED(type) \ + ok((type) -1 > 0, "(" #type ") -1 > 0"); + void test_pack(void) { + /* DWORD_PTR */ + TEST_TYPE(DWORD_PTR, 4, 4); + + /* INT_PTR */ + TEST_TYPE(INT_PTR, 4, 4); + TEST_TYPE_SIGNED(INT_PTR); + + /* LONG_PTR */ + TEST_TYPE(LONG_PTR, 4, 4); + TEST_TYPE_SIGNED(LONG_PTR); + + /* SIZE_T */ + TEST_TYPE(SIZE_T, 4, 4); + + /* SSIZE_T */ + TEST_TYPE(SSIZE_T, 4, 4); + + /* UINT_PTR */ + TEST_TYPE(UINT_PTR, 4, 4); + TEST_TYPE_UNSIGNED(UINT_PTR); + + /* ULONG_PTR */ + TEST_TYPE(ULONG_PTR, 4, 4); + TEST_TYPE_UNSIGNED(ULONG_PTR); + /* ACCESS_ALLOWED_ACE (pack 4) */ TEST_TYPE(ACCESS_ALLOWED_ACE, 12, 4); TEST_FIELD(ACCESS_ALLOWED_ACE, ACE_HEADER, Header, 0, 4, 2); @@ -85,6 +147,9 @@ void test_pack(void) TEST_FIELD(ACCESS_DENIED_ACE, DWORD, Mask, 4, 4, 4); TEST_FIELD(ACCESS_DENIED_ACE, DWORD, SidStart, 8, 4, 4); + /* ACCESS_MASK */ + TEST_TYPE(ACCESS_MASK, 4, 4); + /* ACE_HEADER (pack 4) */ TEST_TYPE(ACE_HEADER, 4, 2); TEST_FIELD(ACE_HEADER, BYTE, AceType, 0, 1, 1); @@ -99,6 +164,29 @@ void test_pack(void) TEST_FIELD(ACL, WORD, AceCount, 4, 2, 2); TEST_FIELD(ACL, WORD, Sbz2, 6, 2, 2); + /* BOOL */ + TEST_TYPE(BOOL, 4, 4); + TEST_TYPE_SIGNED(BOOL); + + /* BOOLEAN */ + TEST_TYPE(BOOLEAN, 1, 1); + + /* BYTE */ + TEST_TYPE(BYTE, 1, 1); + TEST_TYPE_UNSIGNED(BYTE); + + /* CCHAR */ + TEST_TYPE(CCHAR, 1, 1); + TEST_TYPE_SIGNED(CCHAR); + + /* CHAR */ + TEST_TYPE(CHAR, 1, 1); + TEST_TYPE_SIGNED(CHAR); + + /* DWORD */ + TEST_TYPE(DWORD, 4, 4); + TEST_TYPE_UNSIGNED(DWORD); + /* EXCEPTION_POINTERS (pack 4) */ TEST_TYPE(EXCEPTION_POINTERS, 8, 4); TEST_FIELD(EXCEPTION_POINTERS, PEXCEPTION_RECORD, ExceptionRecord, 0, 4, 4); @@ -113,6 +201,12 @@ void test_pack(void) TEST_FIELD(EXCEPTION_RECORD, DWORD, NumberParameters, 16, 4, 4); TEST_FIELD(EXCEPTION_RECORD, DWORD[EXCEPTION_MAXIMUM_PARAMETERS], ExceptionInformation, 20, 60, 4); + /* EXECUTION_STATE */ + TEST_TYPE(EXECUTION_STATE, 4, 4); + + /* FLOAT */ + TEST_TYPE(FLOAT, 4, 4); + /* FLOATING_SAVE_AREA (pack 4) */ TEST_TYPE(FLOATING_SAVE_AREA, 112, 4); TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ControlWord, 0, 4, 4); @@ -126,7 +220,6 @@ void test_pack(void) TEST_FIELD(FLOATING_SAVE_AREA, DWORD, Cr0NpxState, 108, 4, 4); /* FPO_DATA (pack 4) */ - TEST_TYPE(FPO_DATA, 16, 4); TEST_FIELD(FPO_DATA, DWORD, ulOffStart, 0, 4, 4); TEST_FIELD(FPO_DATA, DWORD, cbProcSize, 4, 4, 4); TEST_FIELD(FPO_DATA, DWORD, cdwLocals, 8, 4, 4); @@ -139,6 +232,12 @@ void test_pack(void) TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericExecute, 8, 4, 4); TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericAll, 12, 4, 4); + /* HANDLE */ + TEST_TYPE(HANDLE, 4, 4); + + /* HRESULT */ + TEST_TYPE(HRESULT, 4, 4); + /* IMAGE_ARCHIVE_MEMBER_HEADER (pack 4) */ TEST_TYPE(IMAGE_ARCHIVE_MEMBER_HEADER, 60, 1); TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[16], Name, 0, 16, 1); @@ -151,10 +250,10 @@ void test_pack(void) /* IMAGE_AUX_SYMBOL (pack 2) */ - /* IMAGE_BASE_RELOCATION (pack 2) */ - TEST_TYPE(IMAGE_BASE_RELOCATION, 8, 2); - TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, VirtualAddress, 0, 4, 2); - TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, SizeOfBlock, 4, 4, 2); + /* IMAGE_BASE_RELOCATION (pack 4) */ + TEST_TYPE(IMAGE_BASE_RELOCATION, 8, 4); + TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, VirtualAddress, 0, 4, 4); + TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, SizeOfBlock, 4, 4, 4); /* IMAGE_BOUND_FORWARDER_REF (pack 4) */ TEST_TYPE(IMAGE_BOUND_FORWARDER_REF, 8, 4); @@ -354,7 +453,7 @@ void test_pack(void) TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_swaparea, 60, 2, 2); TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_expver, 62, 2, 2); - /* IMAGE_RESOURCE_DATA_ENTRY */ + /* IMAGE_RESOURCE_DATA_ENTRY (pack 4) */ TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, OffsetToData, 0, 4, 4); TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, Size, 4, 4, 4); TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, CodePage, 8, 4, 4); @@ -461,11 +560,30 @@ void test_pack(void) TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_devid, 192, 2, 2); TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_ddkver, 194, 2, 2); + /* INT */ + TEST_TYPE(INT, 4, 4); + TEST_TYPE_SIGNED(INT); + + /* LANGID */ + TEST_TYPE(LANGID, 2, 2); + + /* LCID */ + TEST_TYPE(LCID, 4, 4); + /* LIST_ENTRY (pack 4) */ TEST_TYPE(LIST_ENTRY, 8, 4); TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Flink, 0, 4, 4); TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Blink, 4, 4, 4); + /* LONG */ + TEST_TYPE(LONG, 4, 4); + TEST_TYPE_SIGNED(LONG); + + /* LPCVOID */ + TEST_TYPE(LPCVOID, 4, 4); + + /* LPTOP_LEVEL_EXCEPTION_FILTER */ + /* LUID (pack 4) */ TEST_TYPE(LUID, 8, 4); TEST_FIELD(LUID, DWORD, LowPart, 0, 4, 4); @@ -503,12 +621,297 @@ void test_pack(void) TEST_FIELD(MESSAGE_RESOURCE_ENTRY, WORD, Flags, 2, 2, 2); TEST_FIELD(MESSAGE_RESOURCE_ENTRY, BYTE[1], Text, 4, 1, 1); + /* PACCESS_ALLOWED_ACE */ + TEST_TYPE(PACCESS_ALLOWED_ACE, 4, 4); + TEST_TYPE_POINTER(PACCESS_ALLOWED_ACE, 12, 4); + + /* PACCESS_DENIED_ACE */ + TEST_TYPE(PACCESS_DENIED_ACE, 4, 4); + TEST_TYPE_POINTER(PACCESS_DENIED_ACE, 12, 4); + + /* PACCESS_TOKEN */ + TEST_TYPE(PACCESS_TOKEN, 4, 4); + + /* PACE_HEADER */ + TEST_TYPE(PACE_HEADER, 4, 4); + TEST_TYPE_POINTER(PACE_HEADER, 4, 2); + + /* PACL */ + TEST_TYPE(PACL, 4, 4); + TEST_TYPE_POINTER(PACL, 8, 2); + + /* PCCH */ + TEST_TYPE(PCCH, 4, 4); + TEST_TYPE_POINTER(PCCH, 1, 1); + + /* PCH */ + TEST_TYPE(PCH, 4, 4); + TEST_TYPE_POINTER(PCH, 1, 1); + + /* PCSTR */ + TEST_TYPE(PCSTR, 4, 4); + TEST_TYPE_POINTER(PCSTR, 1, 1); + + /* PCWCH */ + TEST_TYPE(PCWCH, 4, 4); + TEST_TYPE_POINTER(PCWCH, 2, 2); + + /* PCWSTR */ + TEST_TYPE(PCWSTR, 4, 4); + TEST_TYPE_POINTER(PCWSTR, 2, 2); + + /* PEXCEPTION_HANDLER */ + + /* PEXCEPTION_POINTERS */ + TEST_TYPE(PEXCEPTION_POINTERS, 4, 4); + TEST_TYPE_POINTER(PEXCEPTION_POINTERS, 8, 4); + + /* PEXCEPTION_RECORD */ + TEST_TYPE(PEXCEPTION_RECORD, 4, 4); + TEST_TYPE_POINTER(PEXCEPTION_RECORD, 80, 4); + + /* PFLOATING_SAVE_AREA */ + TEST_TYPE(PFLOATING_SAVE_AREA, 4, 4); + TEST_TYPE_POINTER(PFLOATING_SAVE_AREA, 112, 4); + + /* PFPO_DATA */ + TEST_TYPE(PFPO_DATA, 4, 4); + + /* PGENERIC_MAPPING */ + TEST_TYPE(PGENERIC_MAPPING, 4, 4); + TEST_TYPE_POINTER(PGENERIC_MAPPING, 16, 4); + + /* PHANDLE */ + TEST_TYPE(PHANDLE, 4, 4); + TEST_TYPE_POINTER(PHANDLE, 4, 4); + + /* PIMAGE_ARCHIVE_MEMBER_HEADER */ + TEST_TYPE(PIMAGE_ARCHIVE_MEMBER_HEADER, 4, 4); + TEST_TYPE_POINTER(PIMAGE_ARCHIVE_MEMBER_HEADER, 60, 1); + + /* PIMAGE_AUX_SYMBOL */ + TEST_TYPE(PIMAGE_AUX_SYMBOL, 4, 4); + + /* PIMAGE_BASE_RELOCATION */ + TEST_TYPE(PIMAGE_BASE_RELOCATION, 4, 4); + TEST_TYPE_POINTER(PIMAGE_BASE_RELOCATION, 8, 4); + + /* PIMAGE_BOUND_FORWARDER_REF */ + TEST_TYPE(PIMAGE_BOUND_FORWARDER_REF, 4, 4); + TEST_TYPE_POINTER(PIMAGE_BOUND_FORWARDER_REF, 8, 4); + + /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */ + TEST_TYPE(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4, 4); + TEST_TYPE_POINTER(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8, 4); + + /* PIMAGE_COFF_SYMBOLS_HEADER */ + TEST_TYPE(PIMAGE_COFF_SYMBOLS_HEADER, 4, 4); + TEST_TYPE_POINTER(PIMAGE_COFF_SYMBOLS_HEADER, 32, 4); + + /* PIMAGE_DATA_DIRECTORY */ + TEST_TYPE(PIMAGE_DATA_DIRECTORY, 4, 4); + TEST_TYPE_POINTER(PIMAGE_DATA_DIRECTORY, 8, 4); + + /* PIMAGE_DEBUG_DIRECTORY */ + TEST_TYPE(PIMAGE_DEBUG_DIRECTORY, 4, 4); + TEST_TYPE_POINTER(PIMAGE_DEBUG_DIRECTORY, 28, 4); + + /* PIMAGE_DEBUG_MISC */ + TEST_TYPE(PIMAGE_DEBUG_MISC, 4, 4); + TEST_TYPE_POINTER(PIMAGE_DEBUG_MISC, 16, 4); + + /* PIMAGE_DOS_HEADER */ + TEST_TYPE(PIMAGE_DOS_HEADER, 4, 4); + TEST_TYPE_POINTER(PIMAGE_DOS_HEADER, 64, 2); + + /* PIMAGE_EXPORT_DIRECTORY */ + TEST_TYPE(PIMAGE_EXPORT_DIRECTORY, 4, 4); + TEST_TYPE_POINTER(PIMAGE_EXPORT_DIRECTORY, 40, 4); + + /* PIMAGE_FILE_HEADER */ + TEST_TYPE(PIMAGE_FILE_HEADER, 4, 4); + TEST_TYPE_POINTER(PIMAGE_FILE_HEADER, 20, 4); + + /* PIMAGE_FUNCTION_ENTRY */ + TEST_TYPE(PIMAGE_FUNCTION_ENTRY, 4, 4); + TEST_TYPE_POINTER(PIMAGE_FUNCTION_ENTRY, 12, 4); + + /* PIMAGE_IMPORT_BY_NAME */ + TEST_TYPE(PIMAGE_IMPORT_BY_NAME, 4, 4); + TEST_TYPE_POINTER(PIMAGE_IMPORT_BY_NAME, 4, 2); + + /* PIMAGE_IMPORT_DESCRIPTOR */ + TEST_TYPE(PIMAGE_IMPORT_DESCRIPTOR, 4, 4); + + /* PIMAGE_LINENUMBER */ + TEST_TYPE(PIMAGE_LINENUMBER, 4, 4); + + /* PIMAGE_LOAD_CONFIG_DIRECTORY */ + TEST_TYPE(PIMAGE_LOAD_CONFIG_DIRECTORY, 4, 4); + TEST_TYPE_POINTER(PIMAGE_LOAD_CONFIG_DIRECTORY, 64, 4); + + /* PIMAGE_NT_HEADERS */ + TEST_TYPE(PIMAGE_NT_HEADERS, 4, 4); + TEST_TYPE_POINTER(PIMAGE_NT_HEADERS, 248, 4); + + /* PIMAGE_OPTIONAL_HEADER */ + TEST_TYPE(PIMAGE_OPTIONAL_HEADER, 4, 4); + TEST_TYPE_POINTER(PIMAGE_OPTIONAL_HEADER, 224, 4); + + /* PIMAGE_OS2_HEADER */ + TEST_TYPE(PIMAGE_OS2_HEADER, 4, 4); + TEST_TYPE_POINTER(PIMAGE_OS2_HEADER, 64, 2); + + /* PIMAGE_RELOCATION */ + TEST_TYPE(PIMAGE_RELOCATION, 4, 4); + + /* PIMAGE_RESOURCE_DATA_ENTRY */ + TEST_TYPE(PIMAGE_RESOURCE_DATA_ENTRY, 4, 4); + + /* PIMAGE_RESOURCE_DIRECTORY */ + TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY, 4, 4); + TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIRECTORY, 16, 4); + + /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */ + TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4, 4); + + /* PIMAGE_RESOURCE_DIRECTORY_STRING */ + TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY_STRING, 4, 4); + TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIRECTORY_STRING, 4, 2); + + /* PIMAGE_RESOURCE_DIR_STRING_U */ + TEST_TYPE(PIMAGE_RESOURCE_DIR_STRING_U, 4, 4); + TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIR_STRING_U, 4, 2); + + /* PIMAGE_SECTION_HEADER */ + TEST_TYPE(PIMAGE_SECTION_HEADER, 4, 4); + + /* PIMAGE_SEPARATE_DEBUG_HEADER */ + TEST_TYPE(PIMAGE_SEPARATE_DEBUG_HEADER, 4, 4); + TEST_TYPE_POINTER(PIMAGE_SEPARATE_DEBUG_HEADER, 48, 4); + + /* PIMAGE_SYMBOL */ + TEST_TYPE(PIMAGE_SYMBOL, 4, 4); + + /* PIMAGE_THUNK_DATA */ + TEST_TYPE(PIMAGE_THUNK_DATA, 4, 4); + + /* PIMAGE_TLS_CALLBACK */ + + /* PIMAGE_TLS_DIRECTORY */ + TEST_TYPE(PIMAGE_TLS_DIRECTORY, 4, 4); + TEST_TYPE_POINTER(PIMAGE_TLS_DIRECTORY, 24, 4); + + /* PIMAGE_VXD_HEADER */ + TEST_TYPE(PIMAGE_VXD_HEADER, 4, 4); + TEST_TYPE_POINTER(PIMAGE_VXD_HEADER, 196, 2); + + /* PISECURITY_DESCRIPTOR_RELATIVE */ + TEST_TYPE(PISECURITY_DESCRIPTOR_RELATIVE, 4, 4); + TEST_TYPE_POINTER(PISECURITY_DESCRIPTOR_RELATIVE, 20, 4); + + /* PLARGE_INTEGER */ + TEST_TYPE(PLARGE_INTEGER, 4, 4); + + /* PLIST_ENTRY */ + TEST_TYPE(PLIST_ENTRY, 4, 4); + TEST_TYPE_POINTER(PLIST_ENTRY, 8, 4); + + /* PLUID */ + TEST_TYPE(PLUID, 4, 4); + TEST_TYPE_POINTER(PLUID, 8, 4); + + /* PMEMORY_BASIC_INFORMATION */ + TEST_TYPE(PMEMORY_BASIC_INFORMATION, 4, 4); + TEST_TYPE_POINTER(PMEMORY_BASIC_INFORMATION, 28, 4); + + /* PMESSAGE_RESOURCE_BLOCK */ + TEST_TYPE(PMESSAGE_RESOURCE_BLOCK, 4, 4); + TEST_TYPE_POINTER(PMESSAGE_RESOURCE_BLOCK, 12, 4); + + /* PMESSAGE_RESOURCE_DATA */ + TEST_TYPE(PMESSAGE_RESOURCE_DATA, 4, 4); + TEST_TYPE_POINTER(PMESSAGE_RESOURCE_DATA, 16, 4); + + /* PMESSAGE_RESOURCE_ENTRY */ + TEST_TYPE(PMESSAGE_RESOURCE_ENTRY, 4, 4); + TEST_TYPE_POINTER(PMESSAGE_RESOURCE_ENTRY, 6, 2); + + /* PNT_TIB */ + TEST_TYPE(PNT_TIB, 4, 4); + + /* PPRIVILEGE_SET */ + TEST_TYPE(PPRIVILEGE_SET, 4, 4); + TEST_TYPE_POINTER(PPRIVILEGE_SET, 20, 4); + /* PRIVILEGE_SET (pack 4) */ TEST_TYPE(PRIVILEGE_SET, 20, 4); TEST_FIELD(PRIVILEGE_SET, DWORD, PrivilegeCount, 0, 4, 4); TEST_FIELD(PRIVILEGE_SET, DWORD, Control, 4, 4, 4); TEST_FIELD(PRIVILEGE_SET, LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Privilege, 8, 12, 4); + /* PRLIST_ENTRY */ + TEST_TYPE(PRLIST_ENTRY, 4, 4); + TEST_TYPE_POINTER(PRLIST_ENTRY, 8, 4); + + /* PRTL_CRITICAL_SECTION */ + TEST_TYPE(PRTL_CRITICAL_SECTION, 4, 4); + TEST_TYPE_POINTER(PRTL_CRITICAL_SECTION, 24, 4); + + /* PRTL_CRITICAL_SECTION_DEBUG */ + TEST_TYPE(PRTL_CRITICAL_SECTION_DEBUG, 4, 4); + TEST_TYPE_POINTER(PRTL_CRITICAL_SECTION_DEBUG, 32, 4); + + /* PRTL_RESOURCE_DEBUG */ + TEST_TYPE(PRTL_RESOURCE_DEBUG, 4, 4); + TEST_TYPE_POINTER(PRTL_RESOURCE_DEBUG, 32, 4); + + /* PSECURITY_QUALITY_OF_SERVICE */ + TEST_TYPE(PSECURITY_QUALITY_OF_SERVICE, 4, 4); + + /* PSID_IDENTIFIER_AUTHORITY */ + TEST_TYPE(PSID_IDENTIFIER_AUTHORITY, 4, 4); + TEST_TYPE_POINTER(PSID_IDENTIFIER_AUTHORITY, 6, 1); + + /* PSINGLE_LIST_ENTRY */ + TEST_TYPE(PSINGLE_LIST_ENTRY, 4, 4); + TEST_TYPE_POINTER(PSINGLE_LIST_ENTRY, 4, 4); + + /* PSTR */ + TEST_TYPE(PSTR, 4, 4); + TEST_TYPE_POINTER(PSTR, 1, 1); + + /* PSYSTEM_ALARM_ACE */ + TEST_TYPE(PSYSTEM_ALARM_ACE, 4, 4); + TEST_TYPE_POINTER(PSYSTEM_ALARM_ACE, 12, 4); + + /* PSYSTEM_AUDIT_ACE */ + TEST_TYPE(PSYSTEM_AUDIT_ACE, 4, 4); + TEST_TYPE_POINTER(PSYSTEM_AUDIT_ACE, 12, 4); + + /* PTOKEN_PRIVILEGES */ + TEST_TYPE(PTOKEN_PRIVILEGES, 4, 4); + TEST_TYPE_POINTER(PTOKEN_PRIVILEGES, 16, 4); + + /* PTOP_LEVEL_EXCEPTION_FILTER */ + + /* PTSTR */ + TEST_TYPE(PTSTR, 4, 4); + + /* PULARGE_INTEGER */ + TEST_TYPE(PULARGE_INTEGER, 4, 4); + + /* PVOID */ + TEST_TYPE(PVOID, 4, 4); + + /* PWCH */ + TEST_TYPE(PWCH, 4, 4); + TEST_TYPE_POINTER(PWCH, 2, 2); + + /* PWSTR */ + TEST_TYPE(PWSTR, 4, 4); + TEST_TYPE_POINTER(PWSTR, 2, 2); + /* RTL_CRITICAL_SECTION (pack 4) */ TEST_TYPE(RTL_CRITICAL_SECTION, 24, 4); TEST_FIELD(RTL_CRITICAL_SECTION, PRTL_CRITICAL_SECTION_DEBUG, DebugInfo, 0, 4, 4); @@ -528,6 +931,9 @@ void test_pack(void) TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD, ContentionCount, 20, 4, 4); TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD[ 2 ], Spare, 24, 8, 4); + /* SECURITY_CONTEXT_TRACKING_MODE */ + TEST_TYPE(SECURITY_CONTEXT_TRACKING_MODE, 1, 1); + /* SECURITY_DESCRIPTOR (pack 4) */ TEST_TYPE(SECURITY_DESCRIPTOR, 20, 4); TEST_FIELD(SECURITY_DESCRIPTOR, BYTE, Revision, 0, 1, 1); @@ -538,6 +944,9 @@ void test_pack(void) TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Sacl, 12, 4, 4); TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Dacl, 16, 4, 4); + /* SECURITY_DESCRIPTOR_CONTROL */ + TEST_TYPE(SECURITY_DESCRIPTOR_CONTROL, 2, 2); + /* SECURITY_DESCRIPTOR_RELATIVE (pack 4) */ TEST_TYPE(SECURITY_DESCRIPTOR_RELATIVE, 20, 4); TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, BYTE, Revision, 0, 1, 1); @@ -548,6 +957,13 @@ void test_pack(void) TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Sacl, 12, 4, 4); TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Dacl, 16, 4, 4); + /* SECURITY_INFORMATION */ + TEST_TYPE(SECURITY_INFORMATION, 4, 4); + + /* SHORT */ + TEST_TYPE(SHORT, 2, 2); + TEST_TYPE_SIGNED(SHORT); + /* SID (pack 4) */ TEST_TYPE(SID, 12, 4); TEST_FIELD(SID, BYTE, Revision, 0, 1, 1); @@ -580,6 +996,9 @@ void test_pack(void) TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, Mask, 4, 4, 4); TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, SidStart, 8, 4, 4); + /* TCHAR */ + TEST_TYPE(TCHAR, 1, 1); + /* TOKEN_DEFAULT_DACL (pack 4) */ TEST_TYPE(TOKEN_DEFAULT_DACL, 4, 4); TEST_FIELD(TOKEN_DEFAULT_DACL, PACL, DefaultDacl, 0, 4, 4); @@ -611,6 +1030,129 @@ void test_pack(void) TEST_TYPE(TOKEN_USER, 8, 4); TEST_FIELD(TOKEN_USER, SID_AND_ATTRIBUTES, User, 0, 8, 4); + /* UCHAR */ + TEST_TYPE(UCHAR, 1, 1); + TEST_TYPE_UNSIGNED(UCHAR); + + /* UINT */ + TEST_TYPE(UINT, 4, 4); + TEST_TYPE_UNSIGNED(UINT); + + /* ULONG */ + TEST_TYPE(ULONG, 4, 4); + TEST_TYPE_UNSIGNED(ULONG); + + /* USHORT */ + TEST_TYPE(USHORT, 2, 2); + TEST_TYPE_UNSIGNED(USHORT); + + /* WAITORTIMERCALLBACKFUNC */ + + /* WCHAR */ + TEST_TYPE(WCHAR, 2, 2); + TEST_TYPE_UNSIGNED(WCHAR); + + /* WORD */ + TEST_TYPE(WORD, 2, 2); + TEST_TYPE_UNSIGNED(WORD); + + /* ATOM */ + TEST_TYPE(ATOM, 2, 2); + + /* COLORREF */ + TEST_TYPE(COLORREF, 4, 4); + + /* FARPROC */ + + /* GLOBALHANDLE */ + TEST_TYPE(GLOBALHANDLE, 4, 4); + + /* HCURSOR */ + TEST_TYPE(HCURSOR, 4, 4); + TEST_TYPE_UNSIGNED(HCURSOR); + + /* HFILE */ + TEST_TYPE(HFILE, 4, 4); + TEST_TYPE_SIGNED(HFILE); + + /* HGDIOBJ */ + TEST_TYPE(HGDIOBJ, 4, 4); + + /* HGLOBAL */ + TEST_TYPE(HGLOBAL, 4, 4); + + /* HLOCAL */ + TEST_TYPE(HLOCAL, 4, 4); + + /* HMODULE */ + TEST_TYPE(HMODULE, 4, 4); + TEST_TYPE_UNSIGNED(HMODULE); + + /* LOCALHANDLE */ + TEST_TYPE(LOCALHANDLE, 4, 4); + + /* LPARAM */ + TEST_TYPE(LPARAM, 4, 4); + + /* LPCRECT */ + TEST_TYPE(LPCRECT, 4, 4); + TEST_TYPE_POINTER(LPCRECT, 16, 4); + + /* LPCRECTL */ + TEST_TYPE(LPCRECTL, 4, 4); + TEST_TYPE_POINTER(LPCRECTL, 16, 4); + + /* LPPOINT */ + TEST_TYPE(LPPOINT, 4, 4); + TEST_TYPE_POINTER(LPPOINT, 8, 4); + + /* LPPOINTS */ + TEST_TYPE(LPPOINTS, 4, 4); + TEST_TYPE_POINTER(LPPOINTS, 4, 2); + + /* LPRECT */ + TEST_TYPE(LPRECT, 4, 4); + TEST_TYPE_POINTER(LPRECT, 16, 4); + + /* LPRECTL */ + TEST_TYPE(LPRECTL, 4, 4); + TEST_TYPE_POINTER(LPRECTL, 16, 4); + + /* LPSIZE */ + TEST_TYPE(LPSIZE, 4, 4); + TEST_TYPE_POINTER(LPSIZE, 8, 4); + + /* LRESULT */ + TEST_TYPE(LRESULT, 4, 4); + + /* PPOINT */ + TEST_TYPE(PPOINT, 4, 4); + TEST_TYPE_POINTER(PPOINT, 8, 4); + + /* PPOINTS */ + TEST_TYPE(PPOINTS, 4, 4); + TEST_TYPE_POINTER(PPOINTS, 4, 2); + + /* PRECT */ + TEST_TYPE(PRECT, 4, 4); + TEST_TYPE_POINTER(PRECT, 16, 4); + + /* PRECTL */ + TEST_TYPE(PRECTL, 4, 4); + TEST_TYPE_POINTER(PRECTL, 16, 4); + + /* PROC */ + + /* PSIZE */ + TEST_TYPE(PSIZE, 4, 4); + TEST_TYPE_POINTER(PSIZE, 8, 4); + + /* SIZEL */ + TEST_TYPE(SIZEL, 8, 4); + + /* WPARAM */ + TEST_TYPE(WPARAM, 4, 4); + } START_TEST(generated) diff --git a/dlls/user/tests/generated.c b/dlls/user/tests/generated.c index 34ebd86aa76..b35b9e70f9e 100644 --- a/dlls/user/tests/generated.c +++ b/dlls/user/tests/generated.c @@ -34,6 +34,22 @@ /* FIXME: Not sure if is possible to do without compiler extension */ #endif +#if (_MSC_VER >= 1300) && defined(__cplusplus) +# define _TYPE_ALIGNMENT(type) __alignof(type) +#elif defined(__GNUC__) +# define _TYPE_ALIGNMENT(type) __alignof__(type) +#else +/* + * FIXME: Not sure if is possible to do without compiler extension + * (if type is not just a name that is, if so the normal) + * TYPE_ALIGNMENT can be used) + */ +#endif + +#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) +# define TYPE_ALIGNMENT _TYPE_ALIGNMENT +#endif + /*********************************************************************** * Test helper macros */ @@ -52,8 +68,19 @@ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \ FIELD_OFFSET(type, field)) +#ifdef _TYPE_ALIGNMENT +#define TEST__TYPE_ALIGNMENT(type, align) \ + ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _TYPE_ALIGNMENT(type)) +#else +# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) +#endif + +#ifdef TYPE_ALIGNMENT #define TEST_TYPE_ALIGNMENT(type, align) \ ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", TYPE_ALIGNMENT(type)) +#else +# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) +#endif #define TEST_TYPE_SIZE(type, size) \ ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")", sizeof(type)) @@ -71,6 +98,16 @@ TEST_TYPE_ALIGNMENT(type, align); \ TEST_TYPE_SIZE(type, size) +#define TEST_TYPE_POINTER(type, size, align) \ + TEST__TYPE_ALIGNMENT(*(type)0, align); \ + TEST_TYPE_SIZE(*(type)0, size) + +#define TEST_TYPE_SIGNED(type) \ + ok((type) -1 < 0, "(" #type ") -1 < 0"); + +#define TEST_TYPE_UNSIGNED(type) \ + ok((type) -1 > 0, "(" #type ") -1 > 0"); + void test_pack(void) { /* ACCEL (pack 4) */ @@ -116,16 +153,16 @@ void test_pack(void) TEST_FIELD(COMPAREITEMSTRUCT, UINT, CtlID, 4, 4, 4); TEST_FIELD(COMPAREITEMSTRUCT, HWND, hwndItem, 8, 4, 4); TEST_FIELD(COMPAREITEMSTRUCT, UINT, itemID1, 12, 4, 4); - TEST_FIELD(COMPAREITEMSTRUCT, DWORD, itemData1, 16, 4, 4); + TEST_FIELD(COMPAREITEMSTRUCT, ULONG_PTR, itemData1, 16, 4, 4); TEST_FIELD(COMPAREITEMSTRUCT, UINT, itemID2, 20, 4, 4); - TEST_FIELD(COMPAREITEMSTRUCT, DWORD, itemData2, 24, 4, 4); + TEST_FIELD(COMPAREITEMSTRUCT, ULONG_PTR, itemData2, 24, 4, 4); TEST_FIELD(COMPAREITEMSTRUCT, DWORD, dwLocaleId, 28, 4, 4); /* COPYDATASTRUCT (pack 4) */ TEST_TYPE(COPYDATASTRUCT, 12, 4); - TEST_FIELD(COPYDATASTRUCT, DWORD, dwData, 0, 4, 4); + TEST_FIELD(COPYDATASTRUCT, ULONG_PTR, dwData, 0, 4, 4); TEST_FIELD(COPYDATASTRUCT, DWORD, cbData, 4, 4, 4); - TEST_FIELD(COPYDATASTRUCT, LPVOID, lpData, 8, 4, 4); + TEST_FIELD(COPYDATASTRUCT, PVOID, lpData, 8, 4, 4); /* CREATESTRUCTA (pack 4) */ TEST_TYPE(CREATESTRUCTA, 48, 4); @@ -193,7 +230,13 @@ void test_pack(void) TEST_FIELD(DELETEITEMSTRUCT, UINT, CtlID, 4, 4, 4); TEST_FIELD(DELETEITEMSTRUCT, UINT, itemID, 8, 4, 4); TEST_FIELD(DELETEITEMSTRUCT, HWND, hwndItem, 12, 4, 4); - TEST_FIELD(DELETEITEMSTRUCT, DWORD, itemData, 16, 4, 4); + TEST_FIELD(DELETEITEMSTRUCT, ULONG_PTR, itemData, 16, 4, 4); + + /* DESKTOPENUMPROCA */ + TEST_TYPE(DESKTOPENUMPROCA, 4, 4); + + /* DESKTOPENUMPROCW */ + TEST_TYPE(DESKTOPENUMPROCW, 4, 4); /* DLGITEMTEMPLATE (pack 2) */ TEST_TYPE(DLGITEMTEMPLATE, 18, 2); @@ -205,6 +248,12 @@ void test_pack(void) TEST_FIELD(DLGITEMTEMPLATE, short, cy, 14, 2, 2); TEST_FIELD(DLGITEMTEMPLATE, WORD, id, 16, 2, 2); + /* DLGPROC */ + TEST_TYPE(DLGPROC, 4, 4); + + /* DLGPROC */ + TEST_TYPE(DLGPROC, 4, 4); + /* DLGTEMPLATE (pack 2) */ TEST_TYPE(DLGTEMPLATE, 18, 2); TEST_FIELD(DLGTEMPLATE, DWORD, style, 0, 4, 2); @@ -215,6 +264,12 @@ void test_pack(void) TEST_FIELD(DLGTEMPLATE, short, cx, 14, 2, 2); TEST_FIELD(DLGTEMPLATE, short, cy, 16, 2, 2); + /* DRAWSTATEPROC */ + TEST_TYPE(DRAWSTATEPROC, 4, 4); + + /* DRAWSTATEPROC */ + TEST_TYPE(DRAWSTATEPROC, 4, 4); + /* DRAWTEXTPARAMS (pack 4) */ TEST_TYPE(DRAWTEXTPARAMS, 20, 4); TEST_FIELD(DRAWTEXTPARAMS, UINT, cbSize, 0, 4, 4); @@ -223,6 +278,18 @@ void test_pack(void) TEST_FIELD(DRAWTEXTPARAMS, INT, iRightMargin, 12, 4, 4); TEST_FIELD(DRAWTEXTPARAMS, UINT, uiLengthDrawn, 16, 4, 4); + /* EDITWORDBREAKPROCA */ + TEST_TYPE(EDITWORDBREAKPROCA, 4, 4); + + /* EDITWORDBREAKPROCA */ + TEST_TYPE(EDITWORDBREAKPROCA, 4, 4); + + /* EDITWORDBREAKPROCW */ + TEST_TYPE(EDITWORDBREAKPROCW, 4, 4); + + /* EDITWORDBREAKPROCW */ + TEST_TYPE(EDITWORDBREAKPROCW, 4, 4); + /* EVENTMSG (pack 4) */ TEST_TYPE(EVENTMSG, 20, 4); TEST_FIELD(EVENTMSG, UINT, message, 0, 4, 4); @@ -240,6 +307,12 @@ void test_pack(void) TEST_FIELD(FILTERKEYS, DWORD, iRepeatMSec, 16, 4, 4); TEST_FIELD(FILTERKEYS, DWORD, iBounceMSec, 20, 4, 4); + /* GRAYSTRINGPROC */ + TEST_TYPE(GRAYSTRINGPROC, 4, 4); + + /* GRAYSTRINGPROC */ + TEST_TYPE(GRAYSTRINGPROC, 4, 4); + /* HARDWAREHOOKSTRUCT (pack 4) */ TEST_TYPE(HARDWAREHOOKSTRUCT, 16, 4); TEST_FIELD(HARDWAREHOOKSTRUCT, HWND, hwnd, 0, 4, 4); @@ -253,6 +326,12 @@ void test_pack(void) TEST_FIELD(HARDWAREINPUT, WORD, wParamL, 4, 2, 2); TEST_FIELD(HARDWAREINPUT, WORD, wParamH, 6, 2, 2); + /* HDEVNOTIFY */ + TEST_TYPE(HDEVNOTIFY, 4, 4); + + /* HDWP */ + TEST_TYPE(HDWP, 4, 4); + /* HELPINFO (pack 4) */ TEST_TYPE(HELPINFO, 28, 4); TEST_FIELD(HELPINFO, UINT, cbSize, 0, 4, 4); @@ -294,6 +373,12 @@ void test_pack(void) TEST_FIELD(HIGHCONTRASTW, DWORD, dwFlags, 4, 4, 4); TEST_FIELD(HIGHCONTRASTW, LPWSTR, lpszDefaultScheme, 8, 4, 4); + /* HOOKPROC */ + TEST_TYPE(HOOKPROC, 4, 4); + + /* HOOKPROC */ + TEST_TYPE(HOOKPROC, 4, 4); + /* ICONINFO (pack 4) */ TEST_TYPE(ICONINFO, 20, 4); TEST_FIELD(ICONINFO, BOOL, fIcon, 0, 4, 4); @@ -337,6 +422,347 @@ void test_pack(void) TEST_FIELD(KEYBDINPUT, DWORD, time, 8, 4, 4); TEST_FIELD(KEYBDINPUT, ULONG_PTR, dwExtraInfo, 12, 4, 4); + /* LPACCEL */ + TEST_TYPE(LPACCEL, 4, 4); + TEST_TYPE_POINTER(LPACCEL, 6, 2); + + /* LPACCESSTIMEOUT */ + TEST_TYPE(LPACCESSTIMEOUT, 4, 4); + TEST_TYPE_POINTER(LPACCESSTIMEOUT, 12, 4); + + /* LPANIMATIONINFO */ + TEST_TYPE(LPANIMATIONINFO, 4, 4); + TEST_TYPE_POINTER(LPANIMATIONINFO, 8, 4); + + /* LPCBTACTIVATESTRUCT */ + TEST_TYPE(LPCBTACTIVATESTRUCT, 4, 4); + TEST_TYPE_POINTER(LPCBTACTIVATESTRUCT, 8, 4); + + /* LPCBT_CREATEWNDA */ + TEST_TYPE(LPCBT_CREATEWNDA, 4, 4); + TEST_TYPE_POINTER(LPCBT_CREATEWNDA, 8, 4); + + /* LPCBT_CREATEWNDW */ + TEST_TYPE(LPCBT_CREATEWNDW, 4, 4); + TEST_TYPE_POINTER(LPCBT_CREATEWNDW, 8, 4); + + /* LPCDLGTEMPLATEA */ + TEST_TYPE(LPCDLGTEMPLATEA, 4, 4); + TEST_TYPE_POINTER(LPCDLGTEMPLATEA, 18, 2); + + /* LPCDLGTEMPLATEW */ + TEST_TYPE(LPCDLGTEMPLATEW, 4, 4); + TEST_TYPE_POINTER(LPCDLGTEMPLATEW, 18, 2); + + /* LPCLIENTCREATESTRUCT */ + TEST_TYPE(LPCLIENTCREATESTRUCT, 4, 4); + TEST_TYPE_POINTER(LPCLIENTCREATESTRUCT, 8, 4); + + /* LPCMENUINFO */ + TEST_TYPE(LPCMENUINFO, 4, 4); + TEST_TYPE_POINTER(LPCMENUINFO, 28, 4); + + /* LPCMENUITEMINFOA */ + TEST_TYPE(LPCMENUITEMINFOA, 4, 4); + TEST_TYPE_POINTER(LPCMENUITEMINFOA, 48, 4); + + /* LPCMENUITEMINFOW */ + TEST_TYPE(LPCMENUITEMINFOW, 4, 4); + TEST_TYPE_POINTER(LPCMENUITEMINFOW, 48, 4); + + /* LPCOMBOBOXINFO */ + TEST_TYPE(LPCOMBOBOXINFO, 4, 4); + TEST_TYPE_POINTER(LPCOMBOBOXINFO, 52, 4); + + /* LPCOMPAREITEMSTRUCT */ + TEST_TYPE(LPCOMPAREITEMSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPCOMPAREITEMSTRUCT, 32, 4); + + /* LPCREATESTRUCTA */ + TEST_TYPE(LPCREATESTRUCTA, 4, 4); + TEST_TYPE_POINTER(LPCREATESTRUCTA, 48, 4); + + /* LPCREATESTRUCTW */ + TEST_TYPE(LPCREATESTRUCTW, 4, 4); + TEST_TYPE_POINTER(LPCREATESTRUCTW, 48, 4); + + /* LPCSCROLLINFO */ + TEST_TYPE(LPCSCROLLINFO, 4, 4); + TEST_TYPE_POINTER(LPCSCROLLINFO, 28, 4); + + /* LPCURSORINFO */ + TEST_TYPE(LPCURSORINFO, 4, 4); + TEST_TYPE_POINTER(LPCURSORINFO, 20, 4); + + /* LPCWPRETSTRUCT */ + TEST_TYPE(LPCWPRETSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPCWPRETSTRUCT, 20, 4); + + /* LPCWPSTRUCT */ + TEST_TYPE(LPCWPSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPCWPSTRUCT, 16, 4); + + /* LPDEBUGHOOKINFO */ + TEST_TYPE(LPDEBUGHOOKINFO, 4, 4); + TEST_TYPE_POINTER(LPDEBUGHOOKINFO, 20, 4); + + /* LPDELETEITEMSTRUCT */ + TEST_TYPE(LPDELETEITEMSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPDELETEITEMSTRUCT, 20, 4); + + /* LPDLGITEMTEMPLATEA */ + TEST_TYPE(LPDLGITEMTEMPLATEA, 4, 4); + TEST_TYPE_POINTER(LPDLGITEMTEMPLATEA, 18, 2); + + /* LPDLGITEMTEMPLATEW */ + TEST_TYPE(LPDLGITEMTEMPLATEW, 4, 4); + TEST_TYPE_POINTER(LPDLGITEMTEMPLATEW, 18, 2); + + /* LPDLGTEMPLATEA */ + TEST_TYPE(LPDLGTEMPLATEA, 4, 4); + TEST_TYPE_POINTER(LPDLGTEMPLATEA, 18, 2); + + /* LPDLGTEMPLATEW */ + TEST_TYPE(LPDLGTEMPLATEW, 4, 4); + TEST_TYPE_POINTER(LPDLGTEMPLATEW, 18, 2); + + /* LPDRAWITEMSTRUCT */ + TEST_TYPE(LPDRAWITEMSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPDRAWITEMSTRUCT, 48, 4); + + /* LPDRAWTEXTPARAMS */ + TEST_TYPE(LPDRAWTEXTPARAMS, 4, 4); + TEST_TYPE_POINTER(LPDRAWTEXTPARAMS, 20, 4); + + /* LPEVENTMSG */ + TEST_TYPE(LPEVENTMSG, 4, 4); + TEST_TYPE_POINTER(LPEVENTMSG, 20, 4); + + /* LPFILTERKEYS */ + TEST_TYPE(LPFILTERKEYS, 4, 4); + TEST_TYPE_POINTER(LPFILTERKEYS, 24, 4); + + /* LPHARDWAREHOOKSTRUCT */ + TEST_TYPE(LPHARDWAREHOOKSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPHARDWAREHOOKSTRUCT, 16, 4); + + /* LPHARDWAREINPUT */ + TEST_TYPE(LPHARDWAREINPUT, 4, 4); + TEST_TYPE_POINTER(LPHARDWAREINPUT, 8, 4); + + /* LPHELPINFO */ + TEST_TYPE(LPHELPINFO, 4, 4); + TEST_TYPE_POINTER(LPHELPINFO, 28, 4); + + /* LPHELPWININFOA */ + TEST_TYPE(LPHELPWININFOA, 4, 4); + TEST_TYPE_POINTER(LPHELPWININFOA, 28, 4); + + /* LPHELPWININFOW */ + TEST_TYPE(LPHELPWININFOW, 4, 4); + TEST_TYPE_POINTER(LPHELPWININFOW, 28, 4); + + /* LPHIGHCONTRASTA */ + TEST_TYPE(LPHIGHCONTRASTA, 4, 4); + TEST_TYPE_POINTER(LPHIGHCONTRASTA, 12, 4); + + /* LPHIGHCONTRASTW */ + TEST_TYPE(LPHIGHCONTRASTW, 4, 4); + TEST_TYPE_POINTER(LPHIGHCONTRASTW, 12, 4); + + /* LPICONMETRICSA */ + TEST_TYPE(LPICONMETRICSA, 4, 4); + TEST_TYPE_POINTER(LPICONMETRICSA, 76, 4); + + /* LPICONMETRICSW */ + TEST_TYPE(LPICONMETRICSW, 4, 4); + TEST_TYPE_POINTER(LPICONMETRICSW, 108, 4); + + /* LPINPUT */ + TEST_TYPE(LPINPUT, 4, 4); + + /* LPKBDLLHOOKSTRUCT */ + TEST_TYPE(LPKBDLLHOOKSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPKBDLLHOOKSTRUCT, 20, 4); + + /* LPKEYBDINPUT */ + TEST_TYPE(LPKEYBDINPUT, 4, 4); + TEST_TYPE_POINTER(LPKEYBDINPUT, 16, 4); + + /* LPMDICREATESTRUCTA */ + TEST_TYPE(LPMDICREATESTRUCTA, 4, 4); + TEST_TYPE_POINTER(LPMDICREATESTRUCTA, 36, 4); + + /* LPMDICREATESTRUCTW */ + TEST_TYPE(LPMDICREATESTRUCTW, 4, 4); + TEST_TYPE_POINTER(LPMDICREATESTRUCTW, 36, 4); + + /* LPMDINEXTMENU */ + TEST_TYPE(LPMDINEXTMENU, 4, 4); + TEST_TYPE_POINTER(LPMDINEXTMENU, 12, 4); + + /* LPMEASUREITEMSTRUCT */ + TEST_TYPE(LPMEASUREITEMSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPMEASUREITEMSTRUCT, 24, 4); + + /* LPMENUINFO */ + TEST_TYPE(LPMENUINFO, 4, 4); + TEST_TYPE_POINTER(LPMENUINFO, 28, 4); + + /* LPMENUITEMINFOA */ + TEST_TYPE(LPMENUITEMINFOA, 4, 4); + TEST_TYPE_POINTER(LPMENUITEMINFOA, 48, 4); + + /* LPMENUITEMINFOW */ + TEST_TYPE(LPMENUITEMINFOW, 4, 4); + TEST_TYPE_POINTER(LPMENUITEMINFOW, 48, 4); + + /* LPMENUTEMPLATE */ + TEST_TYPE(LPMENUTEMPLATE, 4, 4); + + /* LPMINIMIZEDMETRICS */ + TEST_TYPE(LPMINIMIZEDMETRICS, 4, 4); + TEST_TYPE_POINTER(LPMINIMIZEDMETRICS, 20, 4); + + /* LPMINMAXINFO */ + TEST_TYPE(LPMINMAXINFO, 4, 4); + TEST_TYPE_POINTER(LPMINMAXINFO, 40, 4); + + /* LPMONITORINFO */ + TEST_TYPE(LPMONITORINFO, 4, 4); + TEST_TYPE_POINTER(LPMONITORINFO, 40, 4); + + /* LPMONITORINFOEXA */ + TEST_TYPE(LPMONITORINFOEXA, 4, 4); + TEST_TYPE_POINTER(LPMONITORINFOEXA, 72, 4); + + /* LPMONITORINFOEXW */ + TEST_TYPE(LPMONITORINFOEXW, 4, 4); + TEST_TYPE_POINTER(LPMONITORINFOEXW, 104, 4); + + /* LPMOUSEHOOKSTRUCT */ + TEST_TYPE(LPMOUSEHOOKSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPMOUSEHOOKSTRUCT, 20, 4); + + /* LPMOUSEINPUT */ + TEST_TYPE(LPMOUSEINPUT, 4, 4); + TEST_TYPE_POINTER(LPMOUSEINPUT, 24, 4); + + /* LPMOUSEKEYS */ + TEST_TYPE(LPMOUSEKEYS, 4, 4); + TEST_TYPE_POINTER(LPMOUSEKEYS, 28, 4); + + /* LPMSG */ + TEST_TYPE(LPMSG, 4, 4); + TEST_TYPE_POINTER(LPMSG, 28, 4); + + /* LPMSGBOXPARAMSA */ + TEST_TYPE(LPMSGBOXPARAMSA, 4, 4); + TEST_TYPE_POINTER(LPMSGBOXPARAMSA, 40, 4); + + /* LPMSGBOXPARAMSW */ + TEST_TYPE(LPMSGBOXPARAMSW, 4, 4); + TEST_TYPE_POINTER(LPMSGBOXPARAMSW, 40, 4); + + /* LPMSLLHOOKSTRUCT */ + TEST_TYPE(LPMSLLHOOKSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPMSLLHOOKSTRUCT, 24, 4); + + /* LPMULTIKEYHELPA */ + TEST_TYPE(LPMULTIKEYHELPA, 4, 4); + TEST_TYPE_POINTER(LPMULTIKEYHELPA, 8, 4); + + /* LPMULTIKEYHELPW */ + TEST_TYPE(LPMULTIKEYHELPW, 4, 4); + TEST_TYPE_POINTER(LPMULTIKEYHELPW, 8, 4); + + /* LPNCCALCSIZE_PARAMS */ + TEST_TYPE(LPNCCALCSIZE_PARAMS, 4, 4); + TEST_TYPE_POINTER(LPNCCALCSIZE_PARAMS, 52, 4); + + /* LPNMHDR */ + TEST_TYPE(LPNMHDR, 4, 4); + TEST_TYPE_POINTER(LPNMHDR, 12, 4); + + /* LPNONCLIENTMETRICSA */ + TEST_TYPE(LPNONCLIENTMETRICSA, 4, 4); + TEST_TYPE_POINTER(LPNONCLIENTMETRICSA, 340, 4); + + /* LPNONCLIENTMETRICSW */ + TEST_TYPE(LPNONCLIENTMETRICSW, 4, 4); + TEST_TYPE_POINTER(LPNONCLIENTMETRICSW, 500, 4); + + /* LPPAINTSTRUCT */ + TEST_TYPE(LPPAINTSTRUCT, 4, 4); + TEST_TYPE_POINTER(LPPAINTSTRUCT, 64, 4); + + /* LPSCROLLINFO */ + TEST_TYPE(LPSCROLLINFO, 4, 4); + TEST_TYPE_POINTER(LPSCROLLINFO, 28, 4); + + /* LPSERIALKEYSA */ + TEST_TYPE(LPSERIALKEYSA, 4, 4); + TEST_TYPE_POINTER(LPSERIALKEYSA, 28, 4); + + /* LPSERIALKEYSW */ + TEST_TYPE(LPSERIALKEYSW, 4, 4); + TEST_TYPE_POINTER(LPSERIALKEYSW, 28, 4); + + /* LPSOUNDSENTRYA */ + TEST_TYPE(LPSOUNDSENTRYA, 4, 4); + TEST_TYPE_POINTER(LPSOUNDSENTRYA, 48, 4); + + /* LPSOUNDSENTRYW */ + TEST_TYPE(LPSOUNDSENTRYW, 4, 4); + TEST_TYPE_POINTER(LPSOUNDSENTRYW, 48, 4); + + /* LPSTICKYKEYS */ + TEST_TYPE(LPSTICKYKEYS, 4, 4); + TEST_TYPE_POINTER(LPSTICKYKEYS, 8, 4); + + /* LPSTYLESTRUCT */ + TEST_TYPE(LPSTYLESTRUCT, 4, 4); + TEST_TYPE_POINTER(LPSTYLESTRUCT, 8, 4); + + /* LPTOGGLEKEYS */ + TEST_TYPE(LPTOGGLEKEYS, 4, 4); + TEST_TYPE_POINTER(LPTOGGLEKEYS, 8, 4); + + /* LPTPMPARAMS */ + TEST_TYPE(LPTPMPARAMS, 4, 4); + TEST_TYPE_POINTER(LPTPMPARAMS, 20, 4); + + /* LPTRACKMOUSEEVENT */ + TEST_TYPE(LPTRACKMOUSEEVENT, 4, 4); + TEST_TYPE_POINTER(LPTRACKMOUSEEVENT, 16, 4); + + /* LPWINDOWINFO */ + TEST_TYPE(LPWINDOWINFO, 4, 4); + + /* LPWINDOWPLACEMENT */ + TEST_TYPE(LPWINDOWPLACEMENT, 4, 4); + TEST_TYPE_POINTER(LPWINDOWPLACEMENT, 44, 4); + + /* LPWINDOWPOS */ + TEST_TYPE(LPWINDOWPOS, 4, 4); + TEST_TYPE_POINTER(LPWINDOWPOS, 28, 4); + + /* LPWNDCLASSA */ + TEST_TYPE(LPWNDCLASSA, 4, 4); + TEST_TYPE_POINTER(LPWNDCLASSA, 40, 4); + + /* LPWNDCLASSEXA */ + TEST_TYPE(LPWNDCLASSEXA, 4, 4); + TEST_TYPE_POINTER(LPWNDCLASSEXA, 48, 4); + + /* LPWNDCLASSEXW */ + TEST_TYPE(LPWNDCLASSEXW, 4, 4); + TEST_TYPE_POINTER(LPWNDCLASSEXW, 48, 4); + + /* LPWNDCLASSW */ + TEST_TYPE(LPWNDCLASSW, 4, 4); + TEST_TYPE_POINTER(LPWNDCLASSW, 40, 4); + /* MDICREATESTRUCTA (pack 4) */ TEST_TYPE(MDICREATESTRUCTA, 36, 4); TEST_FIELD(MDICREATESTRUCTA, LPCSTR, szClass, 0, 4, 4); @@ -374,7 +800,7 @@ void test_pack(void) TEST_FIELD(MEASUREITEMSTRUCT, UINT, itemID, 8, 4, 4); TEST_FIELD(MEASUREITEMSTRUCT, UINT, itemWidth, 12, 4, 4); TEST_FIELD(MEASUREITEMSTRUCT, UINT, itemHeight, 16, 4, 4); - TEST_FIELD(MEASUREITEMSTRUCT, DWORD, itemData, 20, 4, 4); + TEST_FIELD(MEASUREITEMSTRUCT, ULONG_PTR, itemData, 20, 4, 4); /* MENUINFO (pack 4) */ TEST_TYPE(MENUINFO, 28, 4); @@ -384,7 +810,7 @@ void test_pack(void) TEST_FIELD(MENUINFO, UINT, cyMax, 12, 4, 4); TEST_FIELD(MENUINFO, HBRUSH, hbrBack, 16, 4, 4); TEST_FIELD(MENUINFO, DWORD, dwContextHelpID, 20, 4, 4); - TEST_FIELD(MENUINFO, DWORD, dwMenuData, 24, 4, 4); + TEST_FIELD(MENUINFO, ULONG_PTR, dwMenuData, 24, 4, 4); /* MENUITEMINFOA (pack 4) */ TEST_TYPE(MENUITEMINFOA, 48, 4); @@ -396,7 +822,7 @@ void test_pack(void) TEST_FIELD(MENUITEMINFOA, HMENU, hSubMenu, 20, 4, 4); TEST_FIELD(MENUITEMINFOA, HBITMAP, hbmpChecked, 24, 4, 4); TEST_FIELD(MENUITEMINFOA, HBITMAP, hbmpUnchecked, 28, 4, 4); - TEST_FIELD(MENUITEMINFOA, DWORD, dwItemData, 32, 4, 4); + TEST_FIELD(MENUITEMINFOA, ULONG_PTR, dwItemData, 32, 4, 4); TEST_FIELD(MENUITEMINFOA, LPSTR, dwTypeData, 36, 4, 4); TEST_FIELD(MENUITEMINFOA, UINT, cch, 40, 4, 4); TEST_FIELD(MENUITEMINFOA, HBITMAP, hbmpItem, 44, 4, 4); @@ -411,7 +837,7 @@ void test_pack(void) TEST_FIELD(MENUITEMINFOW, HMENU, hSubMenu, 20, 4, 4); TEST_FIELD(MENUITEMINFOW, HBITMAP, hbmpChecked, 24, 4, 4); TEST_FIELD(MENUITEMINFOW, HBITMAP, hbmpUnchecked, 28, 4, 4); - TEST_FIELD(MENUITEMINFOW, DWORD, dwItemData, 32, 4, 4); + TEST_FIELD(MENUITEMINFOW, ULONG_PTR, dwItemData, 32, 4, 4); TEST_FIELD(MENUITEMINFOW, LPWSTR, dwTypeData, 36, 4, 4); TEST_FIELD(MENUITEMINFOW, UINT, cch, 40, 4, 4); TEST_FIELD(MENUITEMINFOW, HBITMAP, hbmpItem, 44, 4, 4); @@ -427,6 +853,8 @@ void test_pack(void) TEST_FIELD(MENUITEMTEMPLATEHEADER, WORD, versionNumber, 0, 2, 2); TEST_FIELD(MENUITEMTEMPLATEHEADER, WORD, offset, 2, 2, 2); + /* MENUTEMPLATE */ + /* MINIMIZEDMETRICS (pack 4) */ TEST_TYPE(MINIMIZEDMETRICS, 20, 4); TEST_FIELD(MINIMIZEDMETRICS, UINT, cbSize, 0, 4, 4); @@ -443,6 +871,8 @@ void test_pack(void) TEST_FIELD(MINMAXINFO, POINT, ptMinTrackSize, 24, 8, 4); TEST_FIELD(MINMAXINFO, POINT, ptMaxTrackSize, 32, 8, 4); + /* MONITORENUMPROC */ + /* MONITORINFO (pack 4) */ TEST_TYPE(MONITORINFO, 40, 4); TEST_FIELD(MONITORINFO, DWORD, cbSize, 0, 4, 4); @@ -479,7 +909,7 @@ void test_pack(void) TEST_FIELD(MOUSEHOOKSTRUCT, POINT, pt, 0, 8, 4); TEST_FIELD(MOUSEHOOKSTRUCT, HWND, hwnd, 8, 4, 4); TEST_FIELD(MOUSEHOOKSTRUCT, UINT, wHitTestCode, 12, 4, 4); - TEST_FIELD(MOUSEHOOKSTRUCT, DWORD, dwExtraInfo, 16, 4, 4); + TEST_FIELD(MOUSEHOOKSTRUCT, ULONG_PTR, dwExtraInfo, 16, 4, 4); /* MOUSEINPUT (pack 4) */ TEST_TYPE(MOUSEINPUT, 24, 4); @@ -509,6 +939,8 @@ void test_pack(void) TEST_FIELD(MSG, DWORD, time, 16, 4, 4); TEST_FIELD(MSG, POINT, pt, 20, 8, 4); + /* MSGBOXCALLBACK */ + /* MSGBOXPARAMSA (pack 4) */ TEST_TYPE(MSGBOXPARAMSA, 40, 4); TEST_FIELD(MSGBOXPARAMSA, UINT, cbSize, 0, 4, 4); @@ -555,6 +987,18 @@ void test_pack(void) TEST_FIELD(MULTIKEYHELPW, WCHAR, mkKeylist, 4, 2, 2); TEST_FIELD(MULTIKEYHELPW, WCHAR[1], szKeyphrase, 6, 2, 2); + /* NAMEENUMPROCA */ + TEST_TYPE(NAMEENUMPROCA, 4, 4); + + /* NAMEENUMPROCA */ + TEST_TYPE(NAMEENUMPROCA, 4, 4); + + /* NAMEENUMPROCW */ + TEST_TYPE(NAMEENUMPROCW, 4, 4); + + /* NAMEENUMPROCW */ + TEST_TYPE(NAMEENUMPROCW, 4, 4); + /* NCCALCSIZE_PARAMS (pack 4) */ TEST_TYPE(NCCALCSIZE_PARAMS, 52, 4); TEST_FIELD(NCCALCSIZE_PARAMS, RECT[3], rgrc, 0, 48, 4); @@ -563,7 +1007,7 @@ void test_pack(void) /* NMHDR (pack 4) */ TEST_TYPE(NMHDR, 12, 4); TEST_FIELD(NMHDR, HWND, hwndFrom, 0, 4, 4); - TEST_FIELD(NMHDR, UINT, idFrom, 4, 4, 4); + TEST_FIELD(NMHDR, UINT_PTR, idFrom, 4, 4, 4); TEST_FIELD(NMHDR, UINT, code, 8, 4, 4); /* NONCLIENTMETRICSA (pack 4) */ @@ -611,6 +1055,220 @@ void test_pack(void) TEST_FIELD(PAINTSTRUCT, BOOL, fIncUpdate, 28, 4, 4); TEST_FIELD(PAINTSTRUCT, BYTE[32], rgbReserved, 32, 32, 1); + /* PCOMBOBOXINFO */ + TEST_TYPE(PCOMBOBOXINFO, 4, 4); + TEST_TYPE_POINTER(PCOMBOBOXINFO, 52, 4); + + /* PCOMPAREITEMSTRUCT */ + TEST_TYPE(PCOMPAREITEMSTRUCT, 4, 4); + TEST_TYPE_POINTER(PCOMPAREITEMSTRUCT, 32, 4); + + /* PCOPYDATASTRUCT */ + TEST_TYPE(PCOPYDATASTRUCT, 4, 4); + TEST_TYPE_POINTER(PCOPYDATASTRUCT, 12, 4); + + /* PCURSORINFO */ + TEST_TYPE(PCURSORINFO, 4, 4); + TEST_TYPE_POINTER(PCURSORINFO, 20, 4); + + /* PCWPRETSTRUCT */ + TEST_TYPE(PCWPRETSTRUCT, 4, 4); + TEST_TYPE_POINTER(PCWPRETSTRUCT, 20, 4); + + /* PCWPSTRUCT */ + TEST_TYPE(PCWPSTRUCT, 4, 4); + TEST_TYPE_POINTER(PCWPSTRUCT, 16, 4); + + /* PDEBUGHOOKINFO */ + TEST_TYPE(PDEBUGHOOKINFO, 4, 4); + TEST_TYPE_POINTER(PDEBUGHOOKINFO, 20, 4); + + /* PDELETEITEMSTRUCT */ + TEST_TYPE(PDELETEITEMSTRUCT, 4, 4); + TEST_TYPE_POINTER(PDELETEITEMSTRUCT, 20, 4); + + /* PDLGITEMTEMPLATEA */ + TEST_TYPE(PDLGITEMTEMPLATEA, 4, 4); + TEST_TYPE_POINTER(PDLGITEMTEMPLATEA, 18, 2); + + /* PDLGITEMTEMPLATEW */ + TEST_TYPE(PDLGITEMTEMPLATEW, 4, 4); + TEST_TYPE_POINTER(PDLGITEMTEMPLATEW, 18, 2); + + /* PDRAWITEMSTRUCT */ + TEST_TYPE(PDRAWITEMSTRUCT, 4, 4); + TEST_TYPE_POINTER(PDRAWITEMSTRUCT, 48, 4); + + /* PEVENTMSG */ + TEST_TYPE(PEVENTMSG, 4, 4); + TEST_TYPE_POINTER(PEVENTMSG, 20, 4); + + /* PGUITHREADINFO */ + TEST_TYPE(PGUITHREADINFO, 4, 4); + TEST_TYPE_POINTER(PGUITHREADINFO, 48, 4); + + /* PHARDWAREHOOKSTRUCT */ + TEST_TYPE(PHARDWAREHOOKSTRUCT, 4, 4); + TEST_TYPE_POINTER(PHARDWAREHOOKSTRUCT, 16, 4); + + /* PHARDWAREINPUT */ + TEST_TYPE(PHARDWAREINPUT, 4, 4); + TEST_TYPE_POINTER(PHARDWAREINPUT, 8, 4); + + /* PHDEVNOTIFY */ + TEST_TYPE(PHDEVNOTIFY, 4, 4); + TEST_TYPE_POINTER(PHDEVNOTIFY, 4, 4); + + /* PHELPWININFOA */ + TEST_TYPE(PHELPWININFOA, 4, 4); + TEST_TYPE_POINTER(PHELPWININFOA, 28, 4); + + /* PHELPWININFOW */ + TEST_TYPE(PHELPWININFOW, 4, 4); + TEST_TYPE_POINTER(PHELPWININFOW, 28, 4); + + /* PICONINFO */ + TEST_TYPE(PICONINFO, 4, 4); + TEST_TYPE_POINTER(PICONINFO, 20, 4); + + /* PICONMETRICSA */ + TEST_TYPE(PICONMETRICSA, 4, 4); + TEST_TYPE_POINTER(PICONMETRICSA, 76, 4); + + /* PICONMETRICSW */ + TEST_TYPE(PICONMETRICSW, 4, 4); + TEST_TYPE_POINTER(PICONMETRICSW, 108, 4); + + /* PINPUT */ + TEST_TYPE(PINPUT, 4, 4); + + /* PKBDLLHOOKSTRUCT */ + TEST_TYPE(PKBDLLHOOKSTRUCT, 4, 4); + TEST_TYPE_POINTER(PKBDLLHOOKSTRUCT, 20, 4); + + /* PKEYBDINPUT */ + TEST_TYPE(PKEYBDINPUT, 4, 4); + TEST_TYPE_POINTER(PKEYBDINPUT, 16, 4); + + /* PMDINEXTMENU */ + TEST_TYPE(PMDINEXTMENU, 4, 4); + TEST_TYPE_POINTER(PMDINEXTMENU, 12, 4); + + /* PMEASUREITEMSTRUCT */ + TEST_TYPE(PMEASUREITEMSTRUCT, 4, 4); + TEST_TYPE_POINTER(PMEASUREITEMSTRUCT, 24, 4); + + /* PMENUITEMTEMPLATE */ + TEST_TYPE(PMENUITEMTEMPLATE, 4, 4); + TEST_TYPE_POINTER(PMENUITEMTEMPLATE, 6, 2); + + /* PMENUITEMTEMPLATEHEADER */ + TEST_TYPE(PMENUITEMTEMPLATEHEADER, 4, 4); + TEST_TYPE_POINTER(PMENUITEMTEMPLATEHEADER, 4, 2); + + /* PMINIMIZEDMETRICS */ + TEST_TYPE(PMINIMIZEDMETRICS, 4, 4); + TEST_TYPE_POINTER(PMINIMIZEDMETRICS, 20, 4); + + /* PMINMAXINFO */ + TEST_TYPE(PMINMAXINFO, 4, 4); + TEST_TYPE_POINTER(PMINMAXINFO, 40, 4); + + /* PMOUSEHOOKSTRUCT */ + TEST_TYPE(PMOUSEHOOKSTRUCT, 4, 4); + TEST_TYPE_POINTER(PMOUSEHOOKSTRUCT, 20, 4); + + /* PMOUSEINPUT */ + TEST_TYPE(PMOUSEINPUT, 4, 4); + TEST_TYPE_POINTER(PMOUSEINPUT, 24, 4); + + /* PMSG */ + TEST_TYPE(PMSG, 4, 4); + TEST_TYPE_POINTER(PMSG, 28, 4); + + /* PMSGBOXPARAMSA */ + TEST_TYPE(PMSGBOXPARAMSA, 4, 4); + TEST_TYPE_POINTER(PMSGBOXPARAMSA, 40, 4); + + /* PMSGBOXPARAMSW */ + TEST_TYPE(PMSGBOXPARAMSW, 4, 4); + TEST_TYPE_POINTER(PMSGBOXPARAMSW, 40, 4); + + /* PMSLLHOOKSTRUCT */ + TEST_TYPE(PMSLLHOOKSTRUCT, 4, 4); + TEST_TYPE_POINTER(PMSLLHOOKSTRUCT, 24, 4); + + /* PMULTIKEYHELPA */ + TEST_TYPE(PMULTIKEYHELPA, 4, 4); + TEST_TYPE_POINTER(PMULTIKEYHELPA, 8, 4); + + /* PMULTIKEYHELPW */ + TEST_TYPE(PMULTIKEYHELPW, 4, 4); + TEST_TYPE_POINTER(PMULTIKEYHELPW, 8, 4); + + /* PNONCLIENTMETRICSA */ + TEST_TYPE(PNONCLIENTMETRICSA, 4, 4); + TEST_TYPE_POINTER(PNONCLIENTMETRICSA, 340, 4); + + /* PNONCLIENTMETRICSW */ + TEST_TYPE(PNONCLIENTMETRICSW, 4, 4); + TEST_TYPE_POINTER(PNONCLIENTMETRICSW, 500, 4); + + /* PPAINTSTRUCT */ + TEST_TYPE(PPAINTSTRUCT, 4, 4); + TEST_TYPE_POINTER(PPAINTSTRUCT, 64, 4); + + /* PROPENUMPROCA */ + TEST_TYPE(PROPENUMPROCA, 4, 4); + + /* PROPENUMPROCA */ + TEST_TYPE(PROPENUMPROCA, 4, 4); + + /* PROPENUMPROCEXA */ + TEST_TYPE(PROPENUMPROCEXA, 4, 4); + + /* PROPENUMPROCEXA */ + TEST_TYPE(PROPENUMPROCEXA, 4, 4); + + /* PROPENUMPROCEXW */ + TEST_TYPE(PROPENUMPROCEXW, 4, 4); + + /* PROPENUMPROCEXW */ + TEST_TYPE(PROPENUMPROCEXW, 4, 4); + + /* PROPENUMPROCW */ + TEST_TYPE(PROPENUMPROCW, 4, 4); + + /* PROPENUMPROCW */ + TEST_TYPE(PROPENUMPROCW, 4, 4); + + /* PWINDOWINFO */ + TEST_TYPE(PWINDOWINFO, 4, 4); + + /* PWINDOWPLACEMENT */ + TEST_TYPE(PWINDOWPLACEMENT, 4, 4); + TEST_TYPE_POINTER(PWINDOWPLACEMENT, 44, 4); + + /* PWINDOWPOS */ + TEST_TYPE(PWINDOWPOS, 4, 4); + TEST_TYPE_POINTER(PWINDOWPOS, 28, 4); + + /* PWNDCLASSA */ + TEST_TYPE(PWNDCLASSA, 4, 4); + TEST_TYPE_POINTER(PWNDCLASSA, 40, 4); + + /* PWNDCLASSEXA */ + TEST_TYPE(PWNDCLASSEXA, 4, 4); + TEST_TYPE_POINTER(PWNDCLASSEXA, 48, 4); + + /* PWNDCLASSEXW */ + TEST_TYPE(PWNDCLASSEXW, 4, 4); + TEST_TYPE_POINTER(PWNDCLASSEXW, 48, 4); + + /* PWNDCLASSW */ + TEST_TYPE(PWNDCLASSW, 4, 4); + TEST_TYPE_POINTER(PWNDCLASSW, 40, 4); + /* SCROLLINFO (pack 4) */ TEST_TYPE(SCROLLINFO, 28, 4); TEST_FIELD(SCROLLINFO, UINT, cbSize, 0, 4, 4); @@ -621,6 +1279,12 @@ void test_pack(void) TEST_FIELD(SCROLLINFO, INT, nPos, 20, 4, 4); TEST_FIELD(SCROLLINFO, INT, nTrackPos, 24, 4, 4); + /* SENDASYNCPROC */ + TEST_TYPE(SENDASYNCPROC, 4, 4); + + /* SENDASYNCPROC */ + TEST_TYPE(SENDASYNCPROC, 4, 4); + /* SERIALKEYSA (pack 4) */ TEST_TYPE(SERIALKEYSA, 28, 4); TEST_FIELD(SERIALKEYSA, UINT, cbSize, 0, 4, 4); @@ -681,6 +1345,12 @@ void test_pack(void) TEST_FIELD(STYLESTRUCT, DWORD, styleOld, 0, 4, 4); TEST_FIELD(STYLESTRUCT, DWORD, styleNew, 4, 4, 4); + /* TIMERPROC */ + TEST_TYPE(TIMERPROC, 4, 4); + + /* TIMERPROC */ + TEST_TYPE(TIMERPROC, 4, 4); + /* TOGGLEKEYS (pack 4) */ TEST_TYPE(TOGGLEKEYS, 8, 4); TEST_FIELD(TOGGLEKEYS, DWORD, cbSize, 0, 4, 4); @@ -698,7 +1368,7 @@ void test_pack(void) TEST_FIELD(TRACKMOUSEEVENT, HWND, hwndTrack, 8, 4, 4); TEST_FIELD(TRACKMOUSEEVENT, DWORD, dwHoverTime, 12, 4, 4); - /* WINDOWINFO */ + /* WINDOWINFO (pack 4) */ TEST_FIELD(WINDOWINFO, DWORD, cbSize, 0, 4, 4); TEST_FIELD(WINDOWINFO, RECT, rcWindow, 4, 16, 4); TEST_FIELD(WINDOWINFO, RECT, rcClient, 20, 16, 4); @@ -719,6 +1389,18 @@ void test_pack(void) TEST_FIELD(WINDOWPOS, INT, cy, 20, 4, 4); TEST_FIELD(WINDOWPOS, UINT, flags, 24, 4, 4); + /* WINEVENTPROC */ + TEST_TYPE(WINEVENTPROC, 4, 4); + + /* WINEVENTPROC */ + TEST_TYPE(WINEVENTPROC, 4, 4); + + /* WINSTAENUMPROCA */ + TEST_TYPE(WINSTAENUMPROCA, 4, 4); + + /* WINSTAENUMPROCW */ + TEST_TYPE(WINSTAENUMPROCW, 4, 4); + /* WNDCLASSA (pack 4) */ TEST_TYPE(WNDCLASSA, 40, 4); TEST_FIELD(WNDCLASSA, UINT, style, 0, 4, 4); @@ -775,6 +1457,14 @@ void test_pack(void) TEST_FIELD(WNDCLASSW, LPCWSTR, lpszMenuName, 32, 4, 4); TEST_FIELD(WNDCLASSW, LPCWSTR, lpszClassName, 36, 4, 4); + /* WNDENUMPROC */ + TEST_TYPE(WNDENUMPROC, 4, 4); + + /* WNDENUMPROC */ + TEST_TYPE(WNDENUMPROC, 4, 4); + + /* WNDPROC */ + } START_TEST(generated)