1 /* File generated automatically from tools/winapi/test.dat; do not edit! */
2 /* This file can be copied, modified and distributed without restriction. */
5 * Unit tests for data structure packing
9 #define _WIN32_IE 0x0501
10 #define _WIN32_WINNT 0x0501
12 #define WINE_NOWINSOCK
23 #include "wine/test.h"
25 /***********************************************************************
26 * Compatibility macros
29 #define DWORD_PTR UINT_PTR
30 #define LONG_PTR INT_PTR
31 #define ULONG_PTR UINT_PTR
33 /***********************************************************************
34 * Windows API extension
37 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
38 # define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
39 #elif defined(__GNUC__)
40 # define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
42 /* FIXME: Not sure if is possible to do without compiler extension */
45 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
46 # define _TYPE_ALIGNMENT(type) __alignof(type)
47 #elif defined(__GNUC__)
48 # define _TYPE_ALIGNMENT(type) __alignof__(type)
51 * FIXME: Not sure if is possible to do without compiler extension
52 * (if type is not just a name that is, if so the normal)
53 * TYPE_ALIGNMENT can be used)
57 #if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
58 #pragma warning(disable:4116)
61 #if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
62 # define TYPE_ALIGNMENT _TYPE_ALIGNMENT
65 /***********************************************************************
69 #ifdef FIELD_ALIGNMENT
70 # define TEST_FIELD_ALIGNMENT(type, field, align) \
71 ok(FIELD_ALIGNMENT(type, field) == align, \
72 "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
73 (int)FIELD_ALIGNMENT(type, field))
75 # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
78 #define TEST_FIELD_OFFSET(type, field, offset) \
79 ok(FIELD_OFFSET(type, field) == offset, \
80 "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
81 (long int)FIELD_OFFSET(type, field))
83 #ifdef _TYPE_ALIGNMENT
84 #define TEST__TYPE_ALIGNMENT(type, align) \
85 ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
87 # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
91 #define TEST_TYPE_ALIGNMENT(type, align) \
92 ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
94 # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
97 #define TEST_TYPE_SIZE(type, size) \
98 ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
100 /***********************************************************************
104 #define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
105 TEST_TYPE_SIZE(field_type, field_size); \
106 TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
107 TEST_FIELD_OFFSET(type, field_name, field_offset); \
109 #define TEST_TYPE(type, size, align) \
110 TEST_TYPE_ALIGNMENT(type, align); \
111 TEST_TYPE_SIZE(type, size)
113 #define TEST_TYPE_POINTER(type, size, align) \
114 TEST__TYPE_ALIGNMENT(*(type)0, align); \
115 TEST_TYPE_SIZE(*(type)0, size)
117 #define TEST_TYPE_SIGNED(type) \
118 ok((type) -1 < 0, "(" #type ") -1 < 0\n");
120 #define TEST_TYPE_UNSIGNED(type) \
121 ok((type) -1 > 0, "(" #type ") -1 > 0\n");
123 static void test_pack_BLOB(void)
126 TEST_TYPE(BLOB, 8, 4);
127 TEST_FIELD(BLOB, ULONG, cbSize, 0, 4, 4);
128 TEST_FIELD(BLOB, BYTE *, pBlobData, 4, 4, 4);
131 static void test_pack_BSTR(void)
134 TEST_TYPE(BSTR, 4, 4);
135 TEST_TYPE_POINTER(BSTR, 2, 2);
138 static void test_pack_BSTRBLOB(void)
140 /* BSTRBLOB (pack 4) */
141 TEST_TYPE(BSTRBLOB, 8, 4);
142 TEST_FIELD(BSTRBLOB, ULONG, cbSize, 0, 4, 4);
143 TEST_FIELD(BSTRBLOB, BYTE *, pData, 4, 4, 4);
146 static void test_pack_BYTE_BLOB(void)
148 /* BYTE_BLOB (pack 4) */
149 TEST_TYPE(BYTE_BLOB, 8, 4);
150 TEST_FIELD(BYTE_BLOB, unsigned long, clSize, 0, 4, 4);
151 TEST_FIELD(BYTE_BLOB, byte[1], abData, 4, 1, 1);
154 static void test_pack_BYTE_SIZEDARR(void)
156 /* BYTE_SIZEDARR (pack 4) */
157 TEST_TYPE(BYTE_SIZEDARR, 8, 4);
158 TEST_FIELD(BYTE_SIZEDARR, unsigned long, clSize, 0, 4, 4);
159 TEST_FIELD(BYTE_SIZEDARR, byte *, pData, 4, 4, 4);
162 static void test_pack_CLIPDATA(void)
164 /* CLIPDATA (pack 4) */
165 TEST_TYPE(CLIPDATA, 12, 4);
166 TEST_FIELD(CLIPDATA, ULONG, cbSize, 0, 4, 4);
167 TEST_FIELD(CLIPDATA, long, ulClipFmt, 4, 4, 4);
168 TEST_FIELD(CLIPDATA, BYTE *, pClipData, 8, 4, 4);
171 static void test_pack_CLIPFORMAT(void)
174 TEST_TYPE(CLIPFORMAT, 2, 2);
175 TEST_TYPE_UNSIGNED(CLIPFORMAT);
178 static void test_pack_COAUTHIDENTITY(void)
180 /* COAUTHIDENTITY (pack 4) */
181 TEST_TYPE(COAUTHIDENTITY, 28, 4);
182 TEST_FIELD(COAUTHIDENTITY, USHORT *, User, 0, 4, 4);
183 TEST_FIELD(COAUTHIDENTITY, ULONG, UserLength, 4, 4, 4);
184 TEST_FIELD(COAUTHIDENTITY, USHORT *, Domain, 8, 4, 4);
185 TEST_FIELD(COAUTHIDENTITY, ULONG, DomainLength, 12, 4, 4);
186 TEST_FIELD(COAUTHIDENTITY, USHORT *, Password, 16, 4, 4);
187 TEST_FIELD(COAUTHIDENTITY, ULONG, PasswordLength, 20, 4, 4);
188 TEST_FIELD(COAUTHIDENTITY, ULONG, Flags, 24, 4, 4);
191 static void test_pack_COAUTHINFO(void)
193 /* COAUTHINFO (pack 4) */
194 TEST_TYPE(COAUTHINFO, 28, 4);
195 TEST_FIELD(COAUTHINFO, DWORD, dwAuthnSvc, 0, 4, 4);
196 TEST_FIELD(COAUTHINFO, DWORD, dwAuthzSvc, 4, 4, 4);
197 TEST_FIELD(COAUTHINFO, LPWSTR, pwszServerPrincName, 8, 4, 4);
198 TEST_FIELD(COAUTHINFO, DWORD, dwAuthnLevel, 12, 4, 4);
199 TEST_FIELD(COAUTHINFO, DWORD, dwImpersonationLevel, 16, 4, 4);
200 TEST_FIELD(COAUTHINFO, COAUTHIDENTITY *, pAuthIdentityData, 20, 4, 4);
201 TEST_FIELD(COAUTHINFO, DWORD, dwCapabilities, 24, 4, 4);
204 static void test_pack_DATE(void)
207 TEST_TYPE(DATE, 8, 8);
210 static void test_pack_DOUBLE(void)
213 TEST_TYPE(DOUBLE, 8, 8);
216 static void test_pack_DWORD_SIZEDARR(void)
218 /* DWORD_SIZEDARR (pack 4) */
219 TEST_TYPE(DWORD_SIZEDARR, 8, 4);
220 TEST_FIELD(DWORD_SIZEDARR, unsigned long, clSize, 0, 4, 4);
221 TEST_FIELD(DWORD_SIZEDARR, unsigned long *, pData, 4, 4, 4);
224 static void test_pack_FLAGGED_BYTE_BLOB(void)
226 /* FLAGGED_BYTE_BLOB (pack 4) */
227 TEST_TYPE(FLAGGED_BYTE_BLOB, 12, 4);
228 TEST_FIELD(FLAGGED_BYTE_BLOB, unsigned long, fFlags, 0, 4, 4);
229 TEST_FIELD(FLAGGED_BYTE_BLOB, unsigned long, clSize, 4, 4, 4);
230 TEST_FIELD(FLAGGED_BYTE_BLOB, byte[1], abData, 8, 1, 1);
233 static void test_pack_FLAGGED_WORD_BLOB(void)
235 /* FLAGGED_WORD_BLOB (pack 4) */
236 TEST_TYPE(FLAGGED_WORD_BLOB, 12, 4);
237 TEST_FIELD(FLAGGED_WORD_BLOB, unsigned long, fFlags, 0, 4, 4);
238 TEST_FIELD(FLAGGED_WORD_BLOB, unsigned long, clSize, 4, 4, 4);
239 TEST_FIELD(FLAGGED_WORD_BLOB, unsigned short[1], asData, 8, 2, 2);
242 static void test_pack_HMETAFILEPICT(void)
245 TEST_TYPE(HMETAFILEPICT, 4, 4);
248 static void test_pack_HYPER_SIZEDARR(void)
250 /* HYPER_SIZEDARR (pack 4) */
251 TEST_TYPE(HYPER_SIZEDARR, 8, 4);
252 TEST_FIELD(HYPER_SIZEDARR, unsigned long, clSize, 0, 4, 4);
253 TEST_FIELD(HYPER_SIZEDARR, hyper *, pData, 4, 4, 4);
256 static void test_pack_LPBLOB(void)
259 TEST_TYPE(LPBLOB, 4, 4);
262 static void test_pack_LPBSTR(void)
265 TEST_TYPE(LPBSTR, 4, 4);
266 TEST_TYPE_POINTER(LPBSTR, 4, 4);
269 static void test_pack_LPBSTRBLOB(void)
272 TEST_TYPE(LPBSTRBLOB, 4, 4);
275 static void test_pack_LPCOLESTR(void)
278 TEST_TYPE(LPCOLESTR, 4, 4);
279 TEST_TYPE_POINTER(LPCOLESTR, 2, 2);
282 static void test_pack_LPCY(void)
285 TEST_TYPE(LPCY, 4, 4);
288 static void test_pack_LPDECIMAL(void)
291 TEST_TYPE(LPDECIMAL, 4, 4);
294 static void test_pack_LPOLESTR(void)
297 TEST_TYPE(LPOLESTR, 4, 4);
298 TEST_TYPE_POINTER(LPOLESTR, 2, 2);
301 static void test_pack_OLECHAR(void)
304 TEST_TYPE(OLECHAR, 2, 2);
307 static void test_pack_PROPID(void)
310 TEST_TYPE(PROPID, 4, 4);
313 static void test_pack_RemHBITMAP(void)
315 /* RemHBITMAP (pack 4) */
316 TEST_TYPE(RemHBITMAP, 8, 4);
317 TEST_FIELD(RemHBITMAP, unsigned long, cbData, 0, 4, 4);
318 TEST_FIELD(RemHBITMAP, byte[1], data, 4, 1, 1);
321 static void test_pack_RemHENHMETAFILE(void)
323 /* RemHENHMETAFILE (pack 4) */
324 TEST_TYPE(RemHENHMETAFILE, 8, 4);
325 TEST_FIELD(RemHENHMETAFILE, unsigned long, cbData, 0, 4, 4);
326 TEST_FIELD(RemHENHMETAFILE, byte[1], data, 4, 1, 1);
329 static void test_pack_RemHGLOBAL(void)
331 /* RemHGLOBAL (pack 4) */
332 TEST_TYPE(RemHGLOBAL, 12, 4);
333 TEST_FIELD(RemHGLOBAL, long, fNullHGlobal, 0, 4, 4);
334 TEST_FIELD(RemHGLOBAL, unsigned long, cbData, 4, 4, 4);
335 TEST_FIELD(RemHGLOBAL, byte[1], data, 8, 1, 1);
338 static void test_pack_RemHMETAFILEPICT(void)
340 /* RemHMETAFILEPICT (pack 4) */
341 TEST_TYPE(RemHMETAFILEPICT, 20, 4);
342 TEST_FIELD(RemHMETAFILEPICT, long, mm, 0, 4, 4);
343 TEST_FIELD(RemHMETAFILEPICT, long, xExt, 4, 4, 4);
344 TEST_FIELD(RemHMETAFILEPICT, long, yExt, 8, 4, 4);
345 TEST_FIELD(RemHMETAFILEPICT, unsigned long, cbData, 12, 4, 4);
346 TEST_FIELD(RemHMETAFILEPICT, byte[1], data, 16, 1, 1);
349 static void test_pack_RemHPALETTE(void)
351 /* RemHPALETTE (pack 4) */
352 TEST_TYPE(RemHPALETTE, 8, 4);
353 TEST_FIELD(RemHPALETTE, unsigned long, cbData, 0, 4, 4);
354 TEST_FIELD(RemHPALETTE, byte[1], data, 4, 1, 1);
357 static void test_pack_SCODE(void)
360 TEST_TYPE(SCODE, 4, 4);
363 static void test_pack_UP_BYTE_BLOB(void)
366 TEST_TYPE(UP_BYTE_BLOB, 4, 4);
367 TEST_TYPE_POINTER(UP_BYTE_BLOB, 8, 4);
370 static void test_pack_UP_FLAGGED_BYTE_BLOB(void)
372 /* UP_FLAGGED_BYTE_BLOB */
373 TEST_TYPE(UP_FLAGGED_BYTE_BLOB, 4, 4);
374 TEST_TYPE_POINTER(UP_FLAGGED_BYTE_BLOB, 12, 4);
377 static void test_pack_UP_FLAGGED_WORD_BLOB(void)
379 /* UP_FLAGGED_WORD_BLOB */
380 TEST_TYPE(UP_FLAGGED_WORD_BLOB, 4, 4);
381 TEST_TYPE_POINTER(UP_FLAGGED_WORD_BLOB, 12, 4);
384 static void test_pack_VARIANT_BOOL(void)
387 TEST_TYPE(VARIANT_BOOL, 2, 2);
388 TEST_TYPE_SIGNED(VARIANT_BOOL);
391 static void test_pack_VARTYPE(void)
394 TEST_TYPE(VARTYPE, 2, 2);
395 TEST_TYPE_UNSIGNED(VARTYPE);
398 static void test_pack_WORD_SIZEDARR(void)
400 /* WORD_SIZEDARR (pack 4) */
401 TEST_TYPE(WORD_SIZEDARR, 8, 4);
402 TEST_FIELD(WORD_SIZEDARR, unsigned long, clSize, 0, 4, 4);
403 TEST_FIELD(WORD_SIZEDARR, unsigned short *, pData, 4, 4, 4);
406 static void test_pack_remoteMETAFILEPICT(void)
408 /* remoteMETAFILEPICT (pack 4) */
409 TEST_TYPE(remoteMETAFILEPICT, 16, 4);
410 TEST_FIELD(remoteMETAFILEPICT, long, mm, 0, 4, 4);
411 TEST_FIELD(remoteMETAFILEPICT, long, xExt, 4, 4, 4);
412 TEST_FIELD(remoteMETAFILEPICT, long, yExt, 8, 4, 4);
413 TEST_FIELD(remoteMETAFILEPICT, userHMETAFILE *, hMF, 12, 4, 4);
416 static void test_pack_userBITMAP(void)
418 /* userBITMAP (pack 4) */
419 TEST_TYPE(userBITMAP, 28, 4);
420 TEST_FIELD(userBITMAP, LONG, bmType, 0, 4, 4);
421 TEST_FIELD(userBITMAP, LONG, bmWidth, 4, 4, 4);
422 TEST_FIELD(userBITMAP, LONG, bmHeight, 8, 4, 4);
423 TEST_FIELD(userBITMAP, LONG, bmWidthBytes, 12, 4, 4);
424 TEST_FIELD(userBITMAP, WORD, bmPlanes, 16, 2, 2);
425 TEST_FIELD(userBITMAP, WORD, bmBitsPixel, 18, 2, 2);
426 TEST_FIELD(userBITMAP, ULONG, cbSize, 20, 4, 4);
427 TEST_FIELD(userBITMAP, byte[1], pBuffer, 24, 1, 1);
430 static void test_pack_userCLIPFORMAT(void)
432 /* userCLIPFORMAT (pack 4) */
433 TEST_FIELD(userCLIPFORMAT, long, fContext, 0, 4, 4);
436 static void test_pack_userHBITMAP(void)
438 /* userHBITMAP (pack 4) */
439 TEST_FIELD(userHBITMAP, long, fContext, 0, 4, 4);
442 static void test_pack_userHENHMETAFILE(void)
444 /* userHENHMETAFILE (pack 4) */
445 TEST_FIELD(userHENHMETAFILE, long, fContext, 0, 4, 4);
448 static void test_pack_userHGLOBAL(void)
450 /* userHGLOBAL (pack 4) */
451 TEST_FIELD(userHGLOBAL, long, fContext, 0, 4, 4);
454 static void test_pack_userHMETAFILE(void)
456 /* userHMETAFILE (pack 4) */
457 TEST_FIELD(userHMETAFILE, long, fContext, 0, 4, 4);
460 static void test_pack_userHMETAFILEPICT(void)
462 /* userHMETAFILEPICT (pack 4) */
463 TEST_FIELD(userHMETAFILEPICT, long, fContext, 0, 4, 4);
466 static void test_pack_userHPALETTE(void)
468 /* userHPALETTE (pack 4) */
469 TEST_FIELD(userHPALETTE, long, fContext, 0, 4, 4);
472 static void test_pack_wireBSTR(void)
475 TEST_TYPE(wireBSTR, 4, 4);
476 TEST_TYPE_POINTER(wireBSTR, 12, 4);
479 static void test_pack_wireCLIPFORMAT(void)
482 TEST_TYPE(wireCLIPFORMAT, 4, 4);
485 static void test_pack_wireHBITMAP(void)
488 TEST_TYPE(wireHBITMAP, 4, 4);
491 static void test_pack_wireHENHMETAFILE(void)
493 /* wireHENHMETAFILE */
494 TEST_TYPE(wireHENHMETAFILE, 4, 4);
497 static void test_pack_wireHGLOBAL(void)
500 TEST_TYPE(wireHGLOBAL, 4, 4);
503 static void test_pack_wireHMETAFILE(void)
506 TEST_TYPE(wireHMETAFILE, 4, 4);
509 static void test_pack_wireHMETAFILEPICT(void)
511 /* wireHMETAFILEPICT */
512 TEST_TYPE(wireHMETAFILEPICT, 4, 4);
515 static void test_pack_wireHPALETTE(void)
518 TEST_TYPE(wireHPALETTE, 4, 4);
521 static void test_pack_CLSID(void)
524 TEST_TYPE(CLSID, 16, 4);
527 static void test_pack_FMTID(void)
530 TEST_TYPE(FMTID, 16, 4);
533 static void test_pack_GUID(void)
536 TEST_TYPE(GUID, 16, 4);
537 TEST_FIELD(GUID, unsigned long, Data1, 0, 4, 4);
538 TEST_FIELD(GUID, unsigned short, Data2, 4, 2, 2);
539 TEST_FIELD(GUID, unsigned short, Data3, 6, 2, 2);
540 TEST_FIELD(GUID, unsigned char[ 8 ], Data4, 8, 8, 1);
543 static void test_pack_IID(void)
546 TEST_TYPE(IID, 16, 4);
549 static void test_pack_LPGUID(void)
552 TEST_TYPE(LPGUID, 4, 4);
553 TEST_TYPE_POINTER(LPGUID, 16, 4);
556 static void test_pack_APPBARDATA(void)
558 /* APPBARDATA (pack 1) */
559 TEST_TYPE(APPBARDATA, 36, 1);
560 TEST_FIELD(APPBARDATA, DWORD, cbSize, 0, 4, 1);
561 TEST_FIELD(APPBARDATA, HWND, hWnd, 4, 4, 1);
562 TEST_FIELD(APPBARDATA, UINT, uCallbackMessage, 8, 4, 1);
563 TEST_FIELD(APPBARDATA, UINT, uEdge, 12, 4, 1);
564 TEST_FIELD(APPBARDATA, RECT, rc, 16, 16, 1);
565 TEST_FIELD(APPBARDATA, LPARAM, lParam, 32, 4, 1);
568 static void test_pack_DRAGINFOA(void)
570 /* DRAGINFOA (pack 1) */
571 TEST_TYPE(DRAGINFOA, 24, 1);
572 TEST_FIELD(DRAGINFOA, UINT, uSize, 0, 4, 1);
573 TEST_FIELD(DRAGINFOA, POINT, pt, 4, 8, 1);
574 TEST_FIELD(DRAGINFOA, BOOL, fNC, 12, 4, 1);
575 TEST_FIELD(DRAGINFOA, LPSTR, lpFileList, 16, 4, 1);
576 TEST_FIELD(DRAGINFOA, DWORD, grfKeyState, 20, 4, 1);
579 static void test_pack_DRAGINFOW(void)
581 /* DRAGINFOW (pack 1) */
582 TEST_TYPE(DRAGINFOW, 24, 1);
583 TEST_FIELD(DRAGINFOW, UINT, uSize, 0, 4, 1);
584 TEST_FIELD(DRAGINFOW, POINT, pt, 4, 8, 1);
585 TEST_FIELD(DRAGINFOW, BOOL, fNC, 12, 4, 1);
586 TEST_FIELD(DRAGINFOW, LPWSTR, lpFileList, 16, 4, 1);
587 TEST_FIELD(DRAGINFOW, DWORD, grfKeyState, 20, 4, 1);
590 static void test_pack_FILEOP_FLAGS(void)
593 TEST_TYPE(FILEOP_FLAGS, 2, 2);
594 TEST_TYPE_UNSIGNED(FILEOP_FLAGS);
597 static void test_pack_LPDRAGINFOA(void)
600 TEST_TYPE(LPDRAGINFOA, 4, 4);
601 TEST_TYPE_POINTER(LPDRAGINFOA, 24, 1);
604 static void test_pack_LPDRAGINFOW(void)
607 TEST_TYPE(LPDRAGINFOW, 4, 4);
608 TEST_TYPE_POINTER(LPDRAGINFOW, 24, 1);
611 static void test_pack_LPSHELLEXECUTEINFOA(void)
613 /* LPSHELLEXECUTEINFOA */
614 TEST_TYPE(LPSHELLEXECUTEINFOA, 4, 4);
617 static void test_pack_LPSHELLEXECUTEINFOW(void)
619 /* LPSHELLEXECUTEINFOW */
620 TEST_TYPE(LPSHELLEXECUTEINFOW, 4, 4);
623 static void test_pack_LPSHFILEOPSTRUCTA(void)
625 /* LPSHFILEOPSTRUCTA */
626 TEST_TYPE(LPSHFILEOPSTRUCTA, 4, 4);
627 TEST_TYPE_POINTER(LPSHFILEOPSTRUCTA, 30, 1);
630 static void test_pack_LPSHFILEOPSTRUCTW(void)
632 /* LPSHFILEOPSTRUCTW */
633 TEST_TYPE(LPSHFILEOPSTRUCTW, 4, 4);
634 TEST_TYPE_POINTER(LPSHFILEOPSTRUCTW, 30, 1);
637 static void test_pack_LPSHNAMEMAPPINGA(void)
639 /* LPSHNAMEMAPPINGA */
640 TEST_TYPE(LPSHNAMEMAPPINGA, 4, 4);
641 TEST_TYPE_POINTER(LPSHNAMEMAPPINGA, 16, 1);
644 static void test_pack_LPSHNAMEMAPPINGW(void)
646 /* LPSHNAMEMAPPINGW */
647 TEST_TYPE(LPSHNAMEMAPPINGW, 4, 4);
648 TEST_TYPE_POINTER(LPSHNAMEMAPPINGW, 16, 1);
651 static void test_pack_NOTIFYICONDATAA(void)
653 /* NOTIFYICONDATAA (pack 1) */
654 TEST_FIELD(NOTIFYICONDATAA, DWORD, cbSize, 0, 4, 1);
655 TEST_FIELD(NOTIFYICONDATAA, HWND, hWnd, 4, 4, 1);
656 TEST_FIELD(NOTIFYICONDATAA, UINT, uID, 8, 4, 1);
657 TEST_FIELD(NOTIFYICONDATAA, UINT, uFlags, 12, 4, 1);
658 TEST_FIELD(NOTIFYICONDATAA, UINT, uCallbackMessage, 16, 4, 1);
659 TEST_FIELD(NOTIFYICONDATAA, HICON, hIcon, 20, 4, 1);
660 TEST_FIELD(NOTIFYICONDATAA, CHAR[128], szTip, 24, 128, 1);
661 TEST_FIELD(NOTIFYICONDATAA, DWORD, dwState, 152, 4, 1);
662 TEST_FIELD(NOTIFYICONDATAA, DWORD, dwStateMask, 156, 4, 1);
663 TEST_FIELD(NOTIFYICONDATAA, CHAR[256], szInfo, 160, 256, 1);
666 static void test_pack_NOTIFYICONDATAW(void)
668 /* NOTIFYICONDATAW (pack 1) */
669 TEST_FIELD(NOTIFYICONDATAW, DWORD, cbSize, 0, 4, 1);
670 TEST_FIELD(NOTIFYICONDATAW, HWND, hWnd, 4, 4, 1);
671 TEST_FIELD(NOTIFYICONDATAW, UINT, uID, 8, 4, 1);
672 TEST_FIELD(NOTIFYICONDATAW, UINT, uFlags, 12, 4, 1);
673 TEST_FIELD(NOTIFYICONDATAW, UINT, uCallbackMessage, 16, 4, 1);
674 TEST_FIELD(NOTIFYICONDATAW, HICON, hIcon, 20, 4, 1);
675 TEST_FIELD(NOTIFYICONDATAW, WCHAR[128], szTip, 24, 256, 1);
676 TEST_FIELD(NOTIFYICONDATAW, DWORD, dwState, 280, 4, 1);
677 TEST_FIELD(NOTIFYICONDATAW, DWORD, dwStateMask, 284, 4, 1);
678 TEST_FIELD(NOTIFYICONDATAW, WCHAR[256], szInfo, 288, 512, 1);
681 static void test_pack_PAPPBARDATA(void)
684 TEST_TYPE(PAPPBARDATA, 4, 4);
685 TEST_TYPE_POINTER(PAPPBARDATA, 36, 1);
688 static void test_pack_PNOTIFYICONDATAA(void)
690 /* PNOTIFYICONDATAA */
691 TEST_TYPE(PNOTIFYICONDATAA, 4, 4);
694 static void test_pack_PNOTIFYICONDATAW(void)
696 /* PNOTIFYICONDATAW */
697 TEST_TYPE(PNOTIFYICONDATAW, 4, 4);
700 static void test_pack_PRINTEROP_FLAGS(void)
702 /* PRINTEROP_FLAGS */
703 TEST_TYPE(PRINTEROP_FLAGS, 2, 2);
704 TEST_TYPE_UNSIGNED(PRINTEROP_FLAGS);
707 static void test_pack_SHELLEXECUTEINFOA(void)
709 /* SHELLEXECUTEINFOA (pack 1) */
710 TEST_FIELD(SHELLEXECUTEINFOA, DWORD, cbSize, 0, 4, 1);
711 TEST_FIELD(SHELLEXECUTEINFOA, ULONG, fMask, 4, 4, 1);
712 TEST_FIELD(SHELLEXECUTEINFOA, HWND, hwnd, 8, 4, 1);
713 TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpVerb, 12, 4, 1);
714 TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpFile, 16, 4, 1);
715 TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpParameters, 20, 4, 1);
716 TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpDirectory, 24, 4, 1);
717 TEST_FIELD(SHELLEXECUTEINFOA, INT, nShow, 28, 4, 1);
718 TEST_FIELD(SHELLEXECUTEINFOA, HINSTANCE, hInstApp, 32, 4, 1);
719 TEST_FIELD(SHELLEXECUTEINFOA, LPVOID, lpIDList, 36, 4, 1);
720 TEST_FIELD(SHELLEXECUTEINFOA, LPCSTR, lpClass, 40, 4, 1);
721 TEST_FIELD(SHELLEXECUTEINFOA, HKEY, hkeyClass, 44, 4, 1);
722 TEST_FIELD(SHELLEXECUTEINFOA, DWORD, dwHotKey, 48, 4, 1);
725 static void test_pack_SHELLEXECUTEINFOW(void)
727 /* SHELLEXECUTEINFOW (pack 1) */
728 TEST_FIELD(SHELLEXECUTEINFOW, DWORD, cbSize, 0, 4, 1);
729 TEST_FIELD(SHELLEXECUTEINFOW, ULONG, fMask, 4, 4, 1);
730 TEST_FIELD(SHELLEXECUTEINFOW, HWND, hwnd, 8, 4, 1);
731 TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpVerb, 12, 4, 1);
732 TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpFile, 16, 4, 1);
733 TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpParameters, 20, 4, 1);
734 TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpDirectory, 24, 4, 1);
735 TEST_FIELD(SHELLEXECUTEINFOW, INT, nShow, 28, 4, 1);
736 TEST_FIELD(SHELLEXECUTEINFOW, HINSTANCE, hInstApp, 32, 4, 1);
737 TEST_FIELD(SHELLEXECUTEINFOW, LPVOID, lpIDList, 36, 4, 1);
738 TEST_FIELD(SHELLEXECUTEINFOW, LPCWSTR, lpClass, 40, 4, 1);
739 TEST_FIELD(SHELLEXECUTEINFOW, HKEY, hkeyClass, 44, 4, 1);
740 TEST_FIELD(SHELLEXECUTEINFOW, DWORD, dwHotKey, 48, 4, 1);
743 static void test_pack_SHFILEINFOA(void)
745 /* SHFILEINFOA (pack 1) */
746 TEST_TYPE(SHFILEINFOA, 352, 1);
747 TEST_FIELD(SHFILEINFOA, HICON, hIcon, 0, 4, 1);
748 TEST_FIELD(SHFILEINFOA, int, iIcon, 4, 4, 1);
749 TEST_FIELD(SHFILEINFOA, DWORD, dwAttributes, 8, 4, 1);
750 TEST_FIELD(SHFILEINFOA, CHAR[MAX_PATH], szDisplayName, 12, 260, 1);
751 TEST_FIELD(SHFILEINFOA, CHAR[80], szTypeName, 272, 80, 1);
754 static void test_pack_SHFILEINFOW(void)
756 /* SHFILEINFOW (pack 1) */
757 TEST_TYPE(SHFILEINFOW, 692, 1);
758 TEST_FIELD(SHFILEINFOW, HICON, hIcon, 0, 4, 1);
759 TEST_FIELD(SHFILEINFOW, int, iIcon, 4, 4, 1);
760 TEST_FIELD(SHFILEINFOW, DWORD, dwAttributes, 8, 4, 1);
761 TEST_FIELD(SHFILEINFOW, WCHAR[MAX_PATH], szDisplayName, 12, 520, 1);
762 TEST_FIELD(SHFILEINFOW, WCHAR[80], szTypeName, 532, 160, 1);
765 static void test_pack_SHFILEOPSTRUCTA(void)
767 /* SHFILEOPSTRUCTA (pack 1) */
768 TEST_TYPE(SHFILEOPSTRUCTA, 30, 1);
769 TEST_FIELD(SHFILEOPSTRUCTA, HWND, hwnd, 0, 4, 1);
770 TEST_FIELD(SHFILEOPSTRUCTA, UINT, wFunc, 4, 4, 1);
771 TEST_FIELD(SHFILEOPSTRUCTA, LPCSTR, pFrom, 8, 4, 1);
772 TEST_FIELD(SHFILEOPSTRUCTA, LPCSTR, pTo, 12, 4, 1);
773 TEST_FIELD(SHFILEOPSTRUCTA, FILEOP_FLAGS, fFlags, 16, 2, 1);
774 TEST_FIELD(SHFILEOPSTRUCTA, BOOL, fAnyOperationsAborted, 18, 4, 1);
775 TEST_FIELD(SHFILEOPSTRUCTA, LPVOID, hNameMappings, 22, 4, 1);
776 TEST_FIELD(SHFILEOPSTRUCTA, LPCSTR, lpszProgressTitle, 26, 4, 1);
779 static void test_pack_SHFILEOPSTRUCTW(void)
781 /* SHFILEOPSTRUCTW (pack 1) */
782 TEST_TYPE(SHFILEOPSTRUCTW, 30, 1);
783 TEST_FIELD(SHFILEOPSTRUCTW, HWND, hwnd, 0, 4, 1);
784 TEST_FIELD(SHFILEOPSTRUCTW, UINT, wFunc, 4, 4, 1);
785 TEST_FIELD(SHFILEOPSTRUCTW, LPCWSTR, pFrom, 8, 4, 1);
786 TEST_FIELD(SHFILEOPSTRUCTW, LPCWSTR, pTo, 12, 4, 1);
787 TEST_FIELD(SHFILEOPSTRUCTW, FILEOP_FLAGS, fFlags, 16, 2, 1);
788 TEST_FIELD(SHFILEOPSTRUCTW, BOOL, fAnyOperationsAborted, 18, 4, 1);
789 TEST_FIELD(SHFILEOPSTRUCTW, LPVOID, hNameMappings, 22, 4, 1);
790 TEST_FIELD(SHFILEOPSTRUCTW, LPCWSTR, lpszProgressTitle, 26, 4, 1);
793 static void test_pack_SHNAMEMAPPINGA(void)
795 /* SHNAMEMAPPINGA (pack 1) */
796 TEST_TYPE(SHNAMEMAPPINGA, 16, 1);
797 TEST_FIELD(SHNAMEMAPPINGA, LPSTR, pszOldPath, 0, 4, 1);
798 TEST_FIELD(SHNAMEMAPPINGA, LPSTR, pszNewPath, 4, 4, 1);
799 TEST_FIELD(SHNAMEMAPPINGA, int, cchOldPath, 8, 4, 1);
800 TEST_FIELD(SHNAMEMAPPINGA, int, cchNewPath, 12, 4, 1);
803 static void test_pack_SHNAMEMAPPINGW(void)
805 /* SHNAMEMAPPINGW (pack 1) */
806 TEST_TYPE(SHNAMEMAPPINGW, 16, 1);
807 TEST_FIELD(SHNAMEMAPPINGW, LPWSTR, pszOldPath, 0, 4, 1);
808 TEST_FIELD(SHNAMEMAPPINGW, LPWSTR, pszNewPath, 4, 4, 1);
809 TEST_FIELD(SHNAMEMAPPINGW, int, cchOldPath, 8, 4, 1);
810 TEST_FIELD(SHNAMEMAPPINGW, int, cchNewPath, 12, 4, 1);
813 static void test_pack_ITEMIDLIST(void)
815 /* ITEMIDLIST (pack 1) */
816 TEST_TYPE(ITEMIDLIST, 3, 1);
817 TEST_FIELD(ITEMIDLIST, SHITEMID, mkid, 0, 3, 1);
820 static void test_pack_LPCITEMIDLIST(void)
823 TEST_TYPE(LPCITEMIDLIST, 4, 4);
824 TEST_TYPE_POINTER(LPCITEMIDLIST, 3, 1);
827 static void test_pack_LPCSHITEMID(void)
830 TEST_TYPE(LPCSHITEMID, 4, 4);
831 TEST_TYPE_POINTER(LPCSHITEMID, 3, 1);
834 static void test_pack_LPITEMIDLIST(void)
837 TEST_TYPE(LPITEMIDLIST, 4, 4);
840 static void test_pack_LPSHELLDETAILS(void)
843 TEST_TYPE(LPSHELLDETAILS, 4, 4);
846 static void test_pack_LPSHITEMID(void)
849 TEST_TYPE(LPSHITEMID, 4, 4);
852 static void test_pack_LPSTRRET(void)
855 TEST_TYPE(LPSTRRET, 4, 4);
858 static void test_pack_SHELLDETAILS(void)
860 /* SHELLDETAILS (pack 1) */
861 TEST_FIELD(SHELLDETAILS, int, fmt, 0, 4, 1);
862 TEST_FIELD(SHELLDETAILS, int, cxChar, 4, 4, 1);
865 static void test_pack_SHITEMID(void)
867 /* SHITEMID (pack 1) */
868 TEST_TYPE(SHITEMID, 3, 1);
869 TEST_FIELD(SHITEMID, WORD, cb, 0, 2, 1);
870 TEST_FIELD(SHITEMID, BYTE[1], abID, 2, 1, 1);
873 static void test_pack_STRRET(void)
875 /* STRRET (pack 4) */
876 TEST_FIELD(STRRET, UINT, uType, 0, 4, 4);
879 static void test_pack_AUTO_SCROLL_DATA(void)
881 /* AUTO_SCROLL_DATA (pack 1) */
882 TEST_TYPE(AUTO_SCROLL_DATA, 48, 1);
883 TEST_FIELD(AUTO_SCROLL_DATA, int, iNextSample, 0, 4, 1);
884 TEST_FIELD(AUTO_SCROLL_DATA, DWORD, dwLastScroll, 4, 4, 1);
885 TEST_FIELD(AUTO_SCROLL_DATA, BOOL, bFull, 8, 4, 1);
886 TEST_FIELD(AUTO_SCROLL_DATA, POINT[NUM_POINTS], pts, 12, 24, 1);
887 TEST_FIELD(AUTO_SCROLL_DATA, DWORD[NUM_POINTS], dwTimes, 36, 12, 1);
890 static void test_pack_BFFCALLBACK(void)
893 TEST_TYPE(BFFCALLBACK, 4, 4);
896 static void test_pack_BROWSEINFOA(void)
898 /* BROWSEINFOA (pack 8) */
899 TEST_TYPE(BROWSEINFOA, 32, 4);
900 TEST_FIELD(BROWSEINFOA, HWND, hwndOwner, 0, 4, 4);
901 TEST_FIELD(BROWSEINFOA, LPCITEMIDLIST, pidlRoot, 4, 4, 4);
902 TEST_FIELD(BROWSEINFOA, LPSTR, pszDisplayName, 8, 4, 4);
903 TEST_FIELD(BROWSEINFOA, LPCSTR, lpszTitle, 12, 4, 4);
904 TEST_FIELD(BROWSEINFOA, UINT, ulFlags, 16, 4, 4);
905 TEST_FIELD(BROWSEINFOA, BFFCALLBACK, lpfn, 20, 4, 4);
906 TEST_FIELD(BROWSEINFOA, LPARAM, lParam, 24, 4, 4);
907 TEST_FIELD(BROWSEINFOA, INT, iImage, 28, 4, 4);
910 static void test_pack_BROWSEINFOW(void)
912 /* BROWSEINFOW (pack 8) */
913 TEST_TYPE(BROWSEINFOW, 32, 4);
914 TEST_FIELD(BROWSEINFOW, HWND, hwndOwner, 0, 4, 4);
915 TEST_FIELD(BROWSEINFOW, LPCITEMIDLIST, pidlRoot, 4, 4, 4);
916 TEST_FIELD(BROWSEINFOW, LPWSTR, pszDisplayName, 8, 4, 4);
917 TEST_FIELD(BROWSEINFOW, LPCWSTR, lpszTitle, 12, 4, 4);
918 TEST_FIELD(BROWSEINFOW, UINT, ulFlags, 16, 4, 4);
919 TEST_FIELD(BROWSEINFOW, BFFCALLBACK, lpfn, 20, 4, 4);
920 TEST_FIELD(BROWSEINFOW, LPARAM, lParam, 24, 4, 4);
921 TEST_FIELD(BROWSEINFOW, INT, iImage, 28, 4, 4);
924 static void test_pack_CABINETSTATE(void)
926 /* CABINETSTATE (pack 1) */
927 TEST_TYPE(CABINETSTATE, 12, 1);
928 TEST_FIELD(CABINETSTATE, WORD, cLength, 0, 2, 1);
929 TEST_FIELD(CABINETSTATE, WORD, nVersion, 2, 2, 1);
930 TEST_FIELD(CABINETSTATE, UINT, fMenuEnumFilter, 8, 4, 1);
933 static void test_pack_CIDA(void)
936 TEST_TYPE(CIDA, 8, 1);
937 TEST_FIELD(CIDA, UINT, cidl, 0, 4, 1);
938 TEST_FIELD(CIDA, UINT[1], aoffset, 4, 4, 1);
941 static void test_pack_CSFV(void)
944 TEST_FIELD(CSFV, UINT, cbSize, 0, 4, 1);
945 TEST_FIELD(CSFV, IShellFolder*, pshf, 4, 4, 1);
946 TEST_FIELD(CSFV, IShellView*, psvOuter, 8, 4, 1);
947 TEST_FIELD(CSFV, LPCITEMIDLIST, pidl, 12, 4, 1);
948 TEST_FIELD(CSFV, LONG, lEvents, 16, 4, 1);
949 TEST_FIELD(CSFV, LPFNVIEWCALLBACK, pfnCallback, 20, 4, 1);
952 static void test_pack_DROPFILES(void)
954 /* DROPFILES (pack 1) */
955 TEST_TYPE(DROPFILES, 20, 1);
956 TEST_FIELD(DROPFILES, DWORD, pFiles, 0, 4, 1);
957 TEST_FIELD(DROPFILES, POINT, pt, 4, 8, 1);
958 TEST_FIELD(DROPFILES, BOOL, fNC, 12, 4, 1);
959 TEST_FIELD(DROPFILES, BOOL, fWide, 16, 4, 1);
962 static void test_pack_FILEDESCRIPTORA(void)
964 /* FILEDESCRIPTORA (pack 1) */
965 TEST_TYPE(FILEDESCRIPTORA, 332, 1);
966 TEST_FIELD(FILEDESCRIPTORA, DWORD, dwFlags, 0, 4, 1);
967 TEST_FIELD(FILEDESCRIPTORA, CLSID, clsid, 4, 16, 1);
968 TEST_FIELD(FILEDESCRIPTORA, SIZEL, sizel, 20, 8, 1);
969 TEST_FIELD(FILEDESCRIPTORA, POINTL, pointl, 28, 8, 1);
970 TEST_FIELD(FILEDESCRIPTORA, DWORD, dwFileAttributes, 36, 4, 1);
971 TEST_FIELD(FILEDESCRIPTORA, FILETIME, ftCreationTime, 40, 8, 1);
972 TEST_FIELD(FILEDESCRIPTORA, FILETIME, ftLastAccessTime, 48, 8, 1);
973 TEST_FIELD(FILEDESCRIPTORA, FILETIME, ftLastWriteTime, 56, 8, 1);
974 TEST_FIELD(FILEDESCRIPTORA, DWORD, nFileSizeHigh, 64, 4, 1);
975 TEST_FIELD(FILEDESCRIPTORA, DWORD, nFileSizeLow, 68, 4, 1);
976 TEST_FIELD(FILEDESCRIPTORA, CHAR[MAX_PATH], cFileName, 72, 260, 1);
979 static void test_pack_FILEDESCRIPTORW(void)
981 /* FILEDESCRIPTORW (pack 1) */
982 TEST_TYPE(FILEDESCRIPTORW, 592, 1);
983 TEST_FIELD(FILEDESCRIPTORW, DWORD, dwFlags, 0, 4, 1);
984 TEST_FIELD(FILEDESCRIPTORW, CLSID, clsid, 4, 16, 1);
985 TEST_FIELD(FILEDESCRIPTORW, SIZEL, sizel, 20, 8, 1);
986 TEST_FIELD(FILEDESCRIPTORW, POINTL, pointl, 28, 8, 1);
987 TEST_FIELD(FILEDESCRIPTORW, DWORD, dwFileAttributes, 36, 4, 1);
988 TEST_FIELD(FILEDESCRIPTORW, FILETIME, ftCreationTime, 40, 8, 1);
989 TEST_FIELD(FILEDESCRIPTORW, FILETIME, ftLastAccessTime, 48, 8, 1);
990 TEST_FIELD(FILEDESCRIPTORW, FILETIME, ftLastWriteTime, 56, 8, 1);
991 TEST_FIELD(FILEDESCRIPTORW, DWORD, nFileSizeHigh, 64, 4, 1);
992 TEST_FIELD(FILEDESCRIPTORW, DWORD, nFileSizeLow, 68, 4, 1);
993 TEST_FIELD(FILEDESCRIPTORW, WCHAR[MAX_PATH], cFileName, 72, 520, 1);
996 static void test_pack_FILEGROUPDESCRIPTORA(void)
998 /* FILEGROUPDESCRIPTORA (pack 1) */
999 TEST_TYPE(FILEGROUPDESCRIPTORA, 336, 1);
1000 TEST_FIELD(FILEGROUPDESCRIPTORA, UINT, cItems, 0, 4, 1);
1001 TEST_FIELD(FILEGROUPDESCRIPTORA, FILEDESCRIPTORA[1], fgd, 4, 332, 1);
1004 static void test_pack_FILEGROUPDESCRIPTORW(void)
1006 /* FILEGROUPDESCRIPTORW (pack 1) */
1007 TEST_TYPE(FILEGROUPDESCRIPTORW, 596, 1);
1008 TEST_FIELD(FILEGROUPDESCRIPTORW, UINT, cItems, 0, 4, 1);
1009 TEST_FIELD(FILEGROUPDESCRIPTORW, FILEDESCRIPTORW[1], fgd, 4, 592, 1);
1012 static void test_pack_LPBROWSEINFOA(void)
1015 TEST_TYPE(LPBROWSEINFOA, 4, 4);
1016 TEST_TYPE_POINTER(LPBROWSEINFOA, 32, 4);
1019 static void test_pack_LPBROWSEINFOW(void)
1022 TEST_TYPE(LPBROWSEINFOW, 4, 4);
1023 TEST_TYPE_POINTER(LPBROWSEINFOW, 32, 4);
1026 static void test_pack_LPCABINETSTATE(void)
1028 /* LPCABINETSTATE */
1029 TEST_TYPE(LPCABINETSTATE, 4, 4);
1030 TEST_TYPE_POINTER(LPCABINETSTATE, 12, 1);
1033 static void test_pack_LPCSFV(void)
1036 TEST_TYPE(LPCSFV, 4, 4);
1039 static void test_pack_LPDROPFILES(void)
1042 TEST_TYPE(LPDROPFILES, 4, 4);
1043 TEST_TYPE_POINTER(LPDROPFILES, 20, 1);
1046 static void test_pack_LPFILEDESCRIPTORA(void)
1048 /* LPFILEDESCRIPTORA */
1049 TEST_TYPE(LPFILEDESCRIPTORA, 4, 4);
1050 TEST_TYPE_POINTER(LPFILEDESCRIPTORA, 332, 1);
1053 static void test_pack_LPFILEDESCRIPTORW(void)
1055 /* LPFILEDESCRIPTORW */
1056 TEST_TYPE(LPFILEDESCRIPTORW, 4, 4);
1057 TEST_TYPE_POINTER(LPFILEDESCRIPTORW, 592, 1);
1060 static void test_pack_LPFILEGROUPDESCRIPTORA(void)
1062 /* LPFILEGROUPDESCRIPTORA */
1063 TEST_TYPE(LPFILEGROUPDESCRIPTORA, 4, 4);
1064 TEST_TYPE_POINTER(LPFILEGROUPDESCRIPTORA, 336, 1);
1067 static void test_pack_LPFILEGROUPDESCRIPTORW(void)
1069 /* LPFILEGROUPDESCRIPTORW */
1070 TEST_TYPE(LPFILEGROUPDESCRIPTORW, 4, 4);
1071 TEST_TYPE_POINTER(LPFILEGROUPDESCRIPTORW, 596, 1);
1074 static void test_pack_LPFNVIEWCALLBACK(void)
1076 /* LPFNVIEWCALLBACK */
1077 TEST_TYPE(LPFNVIEWCALLBACK, 4, 4);
1080 static void test_pack_LPIDA(void)
1083 TEST_TYPE(LPIDA, 4, 4);
1084 TEST_TYPE_POINTER(LPIDA, 8, 1);
1087 static void test_pack_LPQCMINFO(void)
1090 TEST_TYPE(LPQCMINFO, 4, 4);
1091 TEST_TYPE_POINTER(LPQCMINFO, 20, 4);
1094 static void test_pack_LPSHChangeDWORDAsIDList(void)
1096 /* LPSHChangeDWORDAsIDList */
1097 TEST_TYPE(LPSHChangeDWORDAsIDList, 4, 4);
1098 TEST_TYPE_POINTER(LPSHChangeDWORDAsIDList, 12, 1);
1101 static void test_pack_LPSHChangeProductKeyAsIDList(void)
1103 /* LPSHChangeProductKeyAsIDList */
1104 TEST_TYPE(LPSHChangeProductKeyAsIDList, 4, 4);
1105 TEST_TYPE_POINTER(LPSHChangeProductKeyAsIDList, 82, 1);
1108 static void test_pack_LPSHDESCRIPTIONID(void)
1110 /* LPSHDESCRIPTIONID */
1111 TEST_TYPE(LPSHDESCRIPTIONID, 4, 4);
1112 TEST_TYPE_POINTER(LPSHDESCRIPTIONID, 20, 4);
1115 static void test_pack_LPSHELLFLAGSTATE(void)
1117 /* LPSHELLFLAGSTATE */
1118 TEST_TYPE(LPSHELLFLAGSTATE, 4, 4);
1119 TEST_TYPE_POINTER(LPSHELLFLAGSTATE, 4, 1);
1122 static void test_pack_LPSHELLSTATE(void)
1125 TEST_TYPE(LPSHELLSTATE, 4, 4);
1126 TEST_TYPE_POINTER(LPSHELLSTATE, 32, 1);
1129 static void test_pack_LPTBINFO(void)
1132 TEST_TYPE(LPTBINFO, 4, 4);
1133 TEST_TYPE_POINTER(LPTBINFO, 8, 4);
1136 static void test_pack_PBROWSEINFOA(void)
1139 TEST_TYPE(PBROWSEINFOA, 4, 4);
1140 TEST_TYPE_POINTER(PBROWSEINFOA, 32, 4);
1143 static void test_pack_PBROWSEINFOW(void)
1146 TEST_TYPE(PBROWSEINFOW, 4, 4);
1147 TEST_TYPE_POINTER(PBROWSEINFOW, 32, 4);
1150 static void test_pack_QCMINFO(void)
1152 /* QCMINFO (pack 8) */
1153 TEST_TYPE(QCMINFO, 20, 4);
1154 TEST_FIELD(QCMINFO, HMENU, hmenu, 0, 4, 4);
1155 TEST_FIELD(QCMINFO, UINT, indexMenu, 4, 4, 4);
1156 TEST_FIELD(QCMINFO, UINT, idCmdFirst, 8, 4, 4);
1157 TEST_FIELD(QCMINFO, UINT, idCmdLast, 12, 4, 4);
1158 TEST_FIELD(QCMINFO, QCMINFO_IDMAP const*, pIdMap, 16, 4, 4);
1161 static void test_pack_QCMINFO_IDMAP(void)
1163 /* QCMINFO_IDMAP (pack 8) */
1164 TEST_TYPE(QCMINFO_IDMAP, 12, 4);
1165 TEST_FIELD(QCMINFO_IDMAP, UINT, nMaxIds, 0, 4, 4);
1166 TEST_FIELD(QCMINFO_IDMAP, QCMINFO_IDMAP_PLACEMENT[1], pIdList, 4, 8, 4);
1169 static void test_pack_QCMINFO_IDMAP_PLACEMENT(void)
1171 /* QCMINFO_IDMAP_PLACEMENT (pack 8) */
1172 TEST_TYPE(QCMINFO_IDMAP_PLACEMENT, 8, 4);
1173 TEST_FIELD(QCMINFO_IDMAP_PLACEMENT, UINT, id, 0, 4, 4);
1174 TEST_FIELD(QCMINFO_IDMAP_PLACEMENT, UINT, fFlags, 4, 4, 4);
1177 static void test_pack_SHChangeDWORDAsIDList(void)
1179 /* SHChangeDWORDAsIDList (pack 1) */
1180 TEST_TYPE(SHChangeDWORDAsIDList, 12, 1);
1181 TEST_FIELD(SHChangeDWORDAsIDList, USHORT, cb, 0, 2, 1);
1182 TEST_FIELD(SHChangeDWORDAsIDList, DWORD, dwItem1, 2, 4, 1);
1183 TEST_FIELD(SHChangeDWORDAsIDList, DWORD, dwItem2, 6, 4, 1);
1184 TEST_FIELD(SHChangeDWORDAsIDList, USHORT, cbZero, 10, 2, 1);
1187 static void test_pack_SHChangeNotifyEntry(void)
1189 /* SHChangeNotifyEntry (pack 1) */
1190 TEST_TYPE(SHChangeNotifyEntry, 8, 1);
1191 TEST_FIELD(SHChangeNotifyEntry, LPCITEMIDLIST, pidl, 0, 4, 1);
1192 TEST_FIELD(SHChangeNotifyEntry, BOOL, fRecursive, 4, 4, 1);
1195 static void test_pack_SHChangeProductKeyAsIDList(void)
1197 /* SHChangeProductKeyAsIDList (pack 1) */
1198 TEST_TYPE(SHChangeProductKeyAsIDList, 82, 1);
1199 TEST_FIELD(SHChangeProductKeyAsIDList, USHORT, cb, 0, 2, 1);
1200 TEST_FIELD(SHChangeProductKeyAsIDList, WCHAR[39], wszProductKey, 2, 78, 1);
1201 TEST_FIELD(SHChangeProductKeyAsIDList, USHORT, cbZero, 80, 2, 1);
1204 static void test_pack_SHDESCRIPTIONID(void)
1206 /* SHDESCRIPTIONID (pack 8) */
1207 TEST_TYPE(SHDESCRIPTIONID, 20, 4);
1208 TEST_FIELD(SHDESCRIPTIONID, DWORD, dwDescriptionId, 0, 4, 4);
1209 TEST_FIELD(SHDESCRIPTIONID, CLSID, clsid, 4, 16, 4);
1212 static void test_pack_SHELLFLAGSTATE(void)
1214 /* SHELLFLAGSTATE (pack 1) */
1215 TEST_TYPE(SHELLFLAGSTATE, 4, 1);
1218 static void test_pack_SHELLSTATE(void)
1220 /* SHELLSTATE (pack 1) */
1221 TEST_TYPE(SHELLSTATE, 32, 1);
1222 TEST_FIELD(SHELLSTATE, DWORD, dwWin95Unused, 4, 4, 1);
1223 TEST_FIELD(SHELLSTATE, UINT, uWin95Unused, 8, 4, 1);
1224 TEST_FIELD(SHELLSTATE, LONG, lParamSort, 12, 4, 1);
1225 TEST_FIELD(SHELLSTATE, int, iSortDirection, 16, 4, 1);
1226 TEST_FIELD(SHELLSTATE, UINT, version, 20, 4, 1);
1227 TEST_FIELD(SHELLSTATE, UINT, uNotUsed, 24, 4, 1);
1230 static void test_pack_SHELLVIEWID(void)
1233 TEST_TYPE(SHELLVIEWID, 16, 4);
1236 static void test_pack_TBINFO(void)
1238 /* TBINFO (pack 8) */
1239 TEST_TYPE(TBINFO, 8, 4);
1240 TEST_FIELD(TBINFO, UINT, cbuttons, 0, 4, 4);
1241 TEST_FIELD(TBINFO, UINT, uFlags, 4, 4, 4);
1244 static void test_pack(void)
1246 test_pack_APPBARDATA();
1247 test_pack_AUTO_SCROLL_DATA();
1248 test_pack_BFFCALLBACK();
1250 test_pack_BROWSEINFOA();
1251 test_pack_BROWSEINFOW();
1253 test_pack_BSTRBLOB();
1254 test_pack_BYTE_BLOB();
1255 test_pack_BYTE_SIZEDARR();
1256 test_pack_CABINETSTATE();
1258 test_pack_CLIPDATA();
1259 test_pack_CLIPFORMAT();
1261 test_pack_COAUTHIDENTITY();
1262 test_pack_COAUTHINFO();
1266 test_pack_DRAGINFOA();
1267 test_pack_DRAGINFOW();
1268 test_pack_DROPFILES();
1269 test_pack_DWORD_SIZEDARR();
1270 test_pack_FILEDESCRIPTORA();
1271 test_pack_FILEDESCRIPTORW();
1272 test_pack_FILEGROUPDESCRIPTORA();
1273 test_pack_FILEGROUPDESCRIPTORW();
1274 test_pack_FILEOP_FLAGS();
1275 test_pack_FLAGGED_BYTE_BLOB();
1276 test_pack_FLAGGED_WORD_BLOB();
1279 test_pack_HMETAFILEPICT();
1280 test_pack_HYPER_SIZEDARR();
1282 test_pack_ITEMIDLIST();
1284 test_pack_LPBROWSEINFOA();
1285 test_pack_LPBROWSEINFOW();
1287 test_pack_LPBSTRBLOB();
1288 test_pack_LPCABINETSTATE();
1289 test_pack_LPCITEMIDLIST();
1290 test_pack_LPCOLESTR();
1292 test_pack_LPCSHITEMID();
1294 test_pack_LPDECIMAL();
1295 test_pack_LPDRAGINFOA();
1296 test_pack_LPDRAGINFOW();
1297 test_pack_LPDROPFILES();
1298 test_pack_LPFILEDESCRIPTORA();
1299 test_pack_LPFILEDESCRIPTORW();
1300 test_pack_LPFILEGROUPDESCRIPTORA();
1301 test_pack_LPFILEGROUPDESCRIPTORW();
1302 test_pack_LPFNVIEWCALLBACK();
1305 test_pack_LPITEMIDLIST();
1306 test_pack_LPOLESTR();
1307 test_pack_LPQCMINFO();
1308 test_pack_LPSHChangeDWORDAsIDList();
1309 test_pack_LPSHChangeProductKeyAsIDList();
1310 test_pack_LPSHDESCRIPTIONID();
1311 test_pack_LPSHELLDETAILS();
1312 test_pack_LPSHELLEXECUTEINFOA();
1313 test_pack_LPSHELLEXECUTEINFOW();
1314 test_pack_LPSHELLFLAGSTATE();
1315 test_pack_LPSHELLSTATE();
1316 test_pack_LPSHFILEOPSTRUCTA();
1317 test_pack_LPSHFILEOPSTRUCTW();
1318 test_pack_LPSHITEMID();
1319 test_pack_LPSHNAMEMAPPINGA();
1320 test_pack_LPSHNAMEMAPPINGW();
1321 test_pack_LPSTRRET();
1322 test_pack_LPTBINFO();
1323 test_pack_NOTIFYICONDATAA();
1324 test_pack_NOTIFYICONDATAW();
1325 test_pack_OLECHAR();
1326 test_pack_PAPPBARDATA();
1327 test_pack_PBROWSEINFOA();
1328 test_pack_PBROWSEINFOW();
1329 test_pack_PNOTIFYICONDATAA();
1330 test_pack_PNOTIFYICONDATAW();
1331 test_pack_PRINTEROP_FLAGS();
1333 test_pack_QCMINFO();
1334 test_pack_QCMINFO_IDMAP();
1335 test_pack_QCMINFO_IDMAP_PLACEMENT();
1336 test_pack_RemHBITMAP();
1337 test_pack_RemHENHMETAFILE();
1338 test_pack_RemHGLOBAL();
1339 test_pack_RemHMETAFILEPICT();
1340 test_pack_RemHPALETTE();
1342 test_pack_SHChangeDWORDAsIDList();
1343 test_pack_SHChangeNotifyEntry();
1344 test_pack_SHChangeProductKeyAsIDList();
1345 test_pack_SHDESCRIPTIONID();
1346 test_pack_SHELLDETAILS();
1347 test_pack_SHELLEXECUTEINFOA();
1348 test_pack_SHELLEXECUTEINFOW();
1349 test_pack_SHELLFLAGSTATE();
1350 test_pack_SHELLSTATE();
1351 test_pack_SHELLVIEWID();
1352 test_pack_SHFILEINFOA();
1353 test_pack_SHFILEINFOW();
1354 test_pack_SHFILEOPSTRUCTA();
1355 test_pack_SHFILEOPSTRUCTW();
1356 test_pack_SHITEMID();
1357 test_pack_SHNAMEMAPPINGA();
1358 test_pack_SHNAMEMAPPINGW();
1361 test_pack_UP_BYTE_BLOB();
1362 test_pack_UP_FLAGGED_BYTE_BLOB();
1363 test_pack_UP_FLAGGED_WORD_BLOB();
1364 test_pack_VARIANT_BOOL();
1365 test_pack_VARTYPE();
1366 test_pack_WORD_SIZEDARR();
1367 test_pack_remoteMETAFILEPICT();
1368 test_pack_userBITMAP();
1369 test_pack_userCLIPFORMAT();
1370 test_pack_userHBITMAP();
1371 test_pack_userHENHMETAFILE();
1372 test_pack_userHGLOBAL();
1373 test_pack_userHMETAFILE();
1374 test_pack_userHMETAFILEPICT();
1375 test_pack_userHPALETTE();
1376 test_pack_wireBSTR();
1377 test_pack_wireCLIPFORMAT();
1378 test_pack_wireHBITMAP();
1379 test_pack_wireHENHMETAFILE();
1380 test_pack_wireHGLOBAL();
1381 test_pack_wireHMETAFILE();
1382 test_pack_wireHMETAFILEPICT();
1383 test_pack_wireHPALETTE();
1386 START_TEST(generated)