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 /***********************************************************************
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_COSERVERINFO(void)
206 /* COSERVERINFO (pack 4) */
207 TEST_TYPE(COSERVERINFO
, 16, 4);
208 TEST_FIELD(COSERVERINFO
, DWORD
, dwReserved1
, 0, 4, 4);
209 TEST_FIELD(COSERVERINFO
, LPWSTR
, pwszName
, 4, 4, 4);
210 TEST_FIELD(COSERVERINFO
, COAUTHINFO
*, pAuthInfo
, 8, 4, 4);
211 TEST_FIELD(COSERVERINFO
, DWORD
, dwReserved2
, 12, 4, 4);
214 static void test_pack_DWORD_SIZEDARR(void)
216 /* DWORD_SIZEDARR (pack 4) */
217 TEST_TYPE(DWORD_SIZEDARR
, 8, 4);
218 TEST_FIELD(DWORD_SIZEDARR
, unsigned long, clSize
, 0, 4, 4);
219 TEST_FIELD(DWORD_SIZEDARR
, unsigned long *, pData
, 4, 4, 4);
222 static void test_pack_FLAGGED_BYTE_BLOB(void)
224 /* FLAGGED_BYTE_BLOB (pack 4) */
225 TEST_TYPE(FLAGGED_BYTE_BLOB
, 12, 4);
226 TEST_FIELD(FLAGGED_BYTE_BLOB
, unsigned long, fFlags
, 0, 4, 4);
227 TEST_FIELD(FLAGGED_BYTE_BLOB
, unsigned long, clSize
, 4, 4, 4);
228 TEST_FIELD(FLAGGED_BYTE_BLOB
, byte
[1], abData
, 8, 1, 1);
231 static void test_pack_FLAGGED_WORD_BLOB(void)
233 /* FLAGGED_WORD_BLOB (pack 4) */
234 TEST_TYPE(FLAGGED_WORD_BLOB
, 12, 4);
235 TEST_FIELD(FLAGGED_WORD_BLOB
, unsigned long, fFlags
, 0, 4, 4);
236 TEST_FIELD(FLAGGED_WORD_BLOB
, unsigned long, clSize
, 4, 4, 4);
237 TEST_FIELD(FLAGGED_WORD_BLOB
, unsigned short[1], asData
, 8, 2, 2);
240 static void test_pack_HMETAFILEPICT(void)
243 TEST_TYPE(HMETAFILEPICT
, 4, 4);
246 static void test_pack_HYPER_SIZEDARR(void)
248 /* HYPER_SIZEDARR (pack 4) */
249 TEST_TYPE(HYPER_SIZEDARR
, 8, 4);
250 TEST_FIELD(HYPER_SIZEDARR
, unsigned long, clSize
, 0, 4, 4);
251 TEST_FIELD(HYPER_SIZEDARR
, hyper
*, pData
, 4, 4, 4);
254 static void test_pack_LPBLOB(void)
257 TEST_TYPE(LPBLOB
, 4, 4);
258 TEST_TYPE_POINTER(LPBLOB
, 8, 4);
261 static void test_pack_LPBSTR(void)
264 TEST_TYPE(LPBSTR
, 4, 4);
265 TEST_TYPE_POINTER(LPBSTR
, 4, 4);
268 static void test_pack_LPBSTRBLOB(void)
271 TEST_TYPE(LPBSTRBLOB
, 4, 4);
272 TEST_TYPE_POINTER(LPBSTRBLOB
, 8, 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);
838 TEST_TYPE_POINTER(LPITEMIDLIST
, 3, 1);
841 static void test_pack_LPSHELLDETAILS(void)
844 TEST_TYPE(LPSHELLDETAILS
, 4, 4);
847 static void test_pack_LPSHITEMID(void)
850 TEST_TYPE(LPSHITEMID
, 4, 4);
851 TEST_TYPE_POINTER(LPSHITEMID
, 3, 1);
854 static void test_pack_LPSTRRET(void)
857 TEST_TYPE(LPSTRRET
, 4, 4);
860 static void test_pack_SHELLDETAILS(void)
862 /* SHELLDETAILS (pack 1) */
863 TEST_FIELD(SHELLDETAILS
, int, fmt
, 0, 4, 1);
864 TEST_FIELD(SHELLDETAILS
, int, cxChar
, 4, 4, 1);
867 static void test_pack_SHITEMID(void)
869 /* SHITEMID (pack 1) */
870 TEST_TYPE(SHITEMID
, 3, 1);
871 TEST_FIELD(SHITEMID
, WORD
, cb
, 0, 2, 1);
872 TEST_FIELD(SHITEMID
, BYTE
[1], abID
, 2, 1, 1);
875 static void test_pack_STRRET(void)
877 /* STRRET (pack 4) */
878 TEST_FIELD(STRRET
, UINT
, uType
, 0, 4, 4);
881 static void test_pack_AUTO_SCROLL_DATA(void)
883 /* AUTO_SCROLL_DATA (pack 1) */
884 TEST_TYPE(AUTO_SCROLL_DATA
, 48, 1);
885 TEST_FIELD(AUTO_SCROLL_DATA
, int, iNextSample
, 0, 4, 1);
886 TEST_FIELD(AUTO_SCROLL_DATA
, DWORD
, dwLastScroll
, 4, 4, 1);
887 TEST_FIELD(AUTO_SCROLL_DATA
, BOOL
, bFull
, 8, 4, 1);
888 TEST_FIELD(AUTO_SCROLL_DATA
, POINT
[NUM_POINTS
], pts
, 12, 24, 1);
889 TEST_FIELD(AUTO_SCROLL_DATA
, DWORD
[NUM_POINTS
], dwTimes
, 36, 12, 1);
892 static void test_pack_BFFCALLBACK(void)
895 TEST_TYPE(BFFCALLBACK
, 4, 4);
898 static void test_pack_BROWSEINFOA(void)
900 /* BROWSEINFOA (pack 8) */
901 TEST_TYPE(BROWSEINFOA
, 32, 4);
902 TEST_FIELD(BROWSEINFOA
, HWND
, hwndOwner
, 0, 4, 4);
903 TEST_FIELD(BROWSEINFOA
, LPCITEMIDLIST
, pidlRoot
, 4, 4, 4);
904 TEST_FIELD(BROWSEINFOA
, LPSTR
, pszDisplayName
, 8, 4, 4);
905 TEST_FIELD(BROWSEINFOA
, LPCSTR
, lpszTitle
, 12, 4, 4);
906 TEST_FIELD(BROWSEINFOA
, UINT
, ulFlags
, 16, 4, 4);
907 TEST_FIELD(BROWSEINFOA
, BFFCALLBACK
, lpfn
, 20, 4, 4);
908 TEST_FIELD(BROWSEINFOA
, LPARAM
, lParam
, 24, 4, 4);
909 TEST_FIELD(BROWSEINFOA
, INT
, iImage
, 28, 4, 4);
912 static void test_pack_BROWSEINFOW(void)
914 /* BROWSEINFOW (pack 8) */
915 TEST_TYPE(BROWSEINFOW
, 32, 4);
916 TEST_FIELD(BROWSEINFOW
, HWND
, hwndOwner
, 0, 4, 4);
917 TEST_FIELD(BROWSEINFOW
, LPCITEMIDLIST
, pidlRoot
, 4, 4, 4);
918 TEST_FIELD(BROWSEINFOW
, LPWSTR
, pszDisplayName
, 8, 4, 4);
919 TEST_FIELD(BROWSEINFOW
, LPCWSTR
, lpszTitle
, 12, 4, 4);
920 TEST_FIELD(BROWSEINFOW
, UINT
, ulFlags
, 16, 4, 4);
921 TEST_FIELD(BROWSEINFOW
, BFFCALLBACK
, lpfn
, 20, 4, 4);
922 TEST_FIELD(BROWSEINFOW
, LPARAM
, lParam
, 24, 4, 4);
923 TEST_FIELD(BROWSEINFOW
, INT
, iImage
, 28, 4, 4);
926 static void test_pack_CABINETSTATE(void)
928 /* CABINETSTATE (pack 1) */
929 TEST_TYPE(CABINETSTATE
, 12, 1);
930 TEST_FIELD(CABINETSTATE
, WORD
, cLength
, 0, 2, 1);
931 TEST_FIELD(CABINETSTATE
, WORD
, nVersion
, 2, 2, 1);
932 TEST_FIELD(CABINETSTATE
, UINT
, fMenuEnumFilter
, 8, 4, 1);
935 static void test_pack_CIDA(void)
938 TEST_TYPE(CIDA
, 8, 1);
939 TEST_FIELD(CIDA
, UINT
, cidl
, 0, 4, 1);
940 TEST_FIELD(CIDA
, UINT
[1], aoffset
, 4, 4, 1);
943 static void test_pack_CSFV(void)
946 TEST_FIELD(CSFV
, UINT
, cbSize
, 0, 4, 1);
947 TEST_FIELD(CSFV
, IShellFolder
*, pshf
, 4, 4, 1);
948 TEST_FIELD(CSFV
, IShellView
*, psvOuter
, 8, 4, 1);
949 TEST_FIELD(CSFV
, LPCITEMIDLIST
, pidl
, 12, 4, 1);
950 TEST_FIELD(CSFV
, LONG
, lEvents
, 16, 4, 1);
951 TEST_FIELD(CSFV
, LPFNVIEWCALLBACK
, pfnCallback
, 20, 4, 1);
954 static void test_pack_DROPFILES(void)
956 /* DROPFILES (pack 1) */
957 TEST_TYPE(DROPFILES
, 20, 1);
958 TEST_FIELD(DROPFILES
, DWORD
, pFiles
, 0, 4, 1);
959 TEST_FIELD(DROPFILES
, POINT
, pt
, 4, 8, 1);
960 TEST_FIELD(DROPFILES
, BOOL
, fNC
, 12, 4, 1);
961 TEST_FIELD(DROPFILES
, BOOL
, fWide
, 16, 4, 1);
964 static void test_pack_FILEDESCRIPTORA(void)
966 /* FILEDESCRIPTORA (pack 1) */
967 TEST_TYPE(FILEDESCRIPTORA
, 332, 1);
968 TEST_FIELD(FILEDESCRIPTORA
, DWORD
, dwFlags
, 0, 4, 1);
969 TEST_FIELD(FILEDESCRIPTORA
, CLSID
, clsid
, 4, 16, 1);
970 TEST_FIELD(FILEDESCRIPTORA
, SIZEL
, sizel
, 20, 8, 1);
971 TEST_FIELD(FILEDESCRIPTORA
, POINTL
, pointl
, 28, 8, 1);
972 TEST_FIELD(FILEDESCRIPTORA
, DWORD
, dwFileAttributes
, 36, 4, 1);
973 TEST_FIELD(FILEDESCRIPTORA
, FILETIME
, ftCreationTime
, 40, 8, 1);
974 TEST_FIELD(FILEDESCRIPTORA
, FILETIME
, ftLastAccessTime
, 48, 8, 1);
975 TEST_FIELD(FILEDESCRIPTORA
, FILETIME
, ftLastWriteTime
, 56, 8, 1);
976 TEST_FIELD(FILEDESCRIPTORA
, DWORD
, nFileSizeHigh
, 64, 4, 1);
977 TEST_FIELD(FILEDESCRIPTORA
, DWORD
, nFileSizeLow
, 68, 4, 1);
978 TEST_FIELD(FILEDESCRIPTORA
, CHAR
[MAX_PATH
], cFileName
, 72, 260, 1);
981 static void test_pack_FILEDESCRIPTORW(void)
983 /* FILEDESCRIPTORW (pack 1) */
984 TEST_TYPE(FILEDESCRIPTORW
, 592, 1);
985 TEST_FIELD(FILEDESCRIPTORW
, DWORD
, dwFlags
, 0, 4, 1);
986 TEST_FIELD(FILEDESCRIPTORW
, CLSID
, clsid
, 4, 16, 1);
987 TEST_FIELD(FILEDESCRIPTORW
, SIZEL
, sizel
, 20, 8, 1);
988 TEST_FIELD(FILEDESCRIPTORW
, POINTL
, pointl
, 28, 8, 1);
989 TEST_FIELD(FILEDESCRIPTORW
, DWORD
, dwFileAttributes
, 36, 4, 1);
990 TEST_FIELD(FILEDESCRIPTORW
, FILETIME
, ftCreationTime
, 40, 8, 1);
991 TEST_FIELD(FILEDESCRIPTORW
, FILETIME
, ftLastAccessTime
, 48, 8, 1);
992 TEST_FIELD(FILEDESCRIPTORW
, FILETIME
, ftLastWriteTime
, 56, 8, 1);
993 TEST_FIELD(FILEDESCRIPTORW
, DWORD
, nFileSizeHigh
, 64, 4, 1);
994 TEST_FIELD(FILEDESCRIPTORW
, DWORD
, nFileSizeLow
, 68, 4, 1);
995 TEST_FIELD(FILEDESCRIPTORW
, WCHAR
[MAX_PATH
], cFileName
, 72, 520, 1);
998 static void test_pack_FILEGROUPDESCRIPTORA(void)
1000 /* FILEGROUPDESCRIPTORA (pack 1) */
1001 TEST_TYPE(FILEGROUPDESCRIPTORA
, 336, 1);
1002 TEST_FIELD(FILEGROUPDESCRIPTORA
, UINT
, cItems
, 0, 4, 1);
1003 TEST_FIELD(FILEGROUPDESCRIPTORA
, FILEDESCRIPTORA
[1], fgd
, 4, 332, 1);
1006 static void test_pack_FILEGROUPDESCRIPTORW(void)
1008 /* FILEGROUPDESCRIPTORW (pack 1) */
1009 TEST_TYPE(FILEGROUPDESCRIPTORW
, 596, 1);
1010 TEST_FIELD(FILEGROUPDESCRIPTORW
, UINT
, cItems
, 0, 4, 1);
1011 TEST_FIELD(FILEGROUPDESCRIPTORW
, FILEDESCRIPTORW
[1], fgd
, 4, 592, 1);
1014 static void test_pack_IFileSystemBindData(void)
1016 /* IFileSystemBindData */
1019 static void test_pack_IFileSystemBindDataVtbl(void)
1021 /* IFileSystemBindDataVtbl */
1024 static void test_pack_IShellChangeNotify(void)
1026 /* IShellChangeNotify */
1029 static void test_pack_IShellIcon(void)
1034 static void test_pack_LPBROWSEINFOA(void)
1037 TEST_TYPE(LPBROWSEINFOA
, 4, 4);
1038 TEST_TYPE_POINTER(LPBROWSEINFOA
, 32, 4);
1041 static void test_pack_LPBROWSEINFOW(void)
1044 TEST_TYPE(LPBROWSEINFOW
, 4, 4);
1045 TEST_TYPE_POINTER(LPBROWSEINFOW
, 32, 4);
1048 static void test_pack_LPCABINETSTATE(void)
1050 /* LPCABINETSTATE */
1051 TEST_TYPE(LPCABINETSTATE
, 4, 4);
1052 TEST_TYPE_POINTER(LPCABINETSTATE
, 12, 1);
1055 static void test_pack_LPCSFV(void)
1058 TEST_TYPE(LPCSFV
, 4, 4);
1061 static void test_pack_LPDROPFILES(void)
1064 TEST_TYPE(LPDROPFILES
, 4, 4);
1065 TEST_TYPE_POINTER(LPDROPFILES
, 20, 1);
1068 static void test_pack_LPFILEDESCRIPTORA(void)
1070 /* LPFILEDESCRIPTORA */
1071 TEST_TYPE(LPFILEDESCRIPTORA
, 4, 4);
1072 TEST_TYPE_POINTER(LPFILEDESCRIPTORA
, 332, 1);
1075 static void test_pack_LPFILEDESCRIPTORW(void)
1077 /* LPFILEDESCRIPTORW */
1078 TEST_TYPE(LPFILEDESCRIPTORW
, 4, 4);
1079 TEST_TYPE_POINTER(LPFILEDESCRIPTORW
, 592, 1);
1082 static void test_pack_LPFILEGROUPDESCRIPTORA(void)
1084 /* LPFILEGROUPDESCRIPTORA */
1085 TEST_TYPE(LPFILEGROUPDESCRIPTORA
, 4, 4);
1086 TEST_TYPE_POINTER(LPFILEGROUPDESCRIPTORA
, 336, 1);
1089 static void test_pack_LPFILEGROUPDESCRIPTORW(void)
1091 /* LPFILEGROUPDESCRIPTORW */
1092 TEST_TYPE(LPFILEGROUPDESCRIPTORW
, 4, 4);
1093 TEST_TYPE_POINTER(LPFILEGROUPDESCRIPTORW
, 596, 1);
1096 static void test_pack_LPFNVIEWCALLBACK(void)
1098 /* LPFNVIEWCALLBACK */
1099 TEST_TYPE(LPFNVIEWCALLBACK
, 4, 4);
1102 static void test_pack_LPIDA(void)
1105 TEST_TYPE(LPIDA
, 4, 4);
1106 TEST_TYPE_POINTER(LPIDA
, 8, 1);
1109 static void test_pack_LPQCMINFO(void)
1112 TEST_TYPE(LPQCMINFO
, 4, 4);
1113 TEST_TYPE_POINTER(LPQCMINFO
, 20, 4);
1116 static void test_pack_LPSHChangeDWORDAsIDList(void)
1118 /* LPSHChangeDWORDAsIDList */
1119 TEST_TYPE(LPSHChangeDWORDAsIDList
, 4, 4);
1120 TEST_TYPE_POINTER(LPSHChangeDWORDAsIDList
, 12, 1);
1123 static void test_pack_LPSHChangeProductKeyAsIDList(void)
1125 /* LPSHChangeProductKeyAsIDList */
1126 TEST_TYPE(LPSHChangeProductKeyAsIDList
, 4, 4);
1127 TEST_TYPE_POINTER(LPSHChangeProductKeyAsIDList
, 82, 1);
1130 static void test_pack_LPSHDESCRIPTIONID(void)
1132 /* LPSHDESCRIPTIONID */
1133 TEST_TYPE(LPSHDESCRIPTIONID
, 4, 4);
1134 TEST_TYPE_POINTER(LPSHDESCRIPTIONID
, 20, 4);
1137 static void test_pack_LPSHELLFLAGSTATE(void)
1139 /* LPSHELLFLAGSTATE */
1140 TEST_TYPE(LPSHELLFLAGSTATE
, 4, 4);
1141 TEST_TYPE_POINTER(LPSHELLFLAGSTATE
, 4, 1);
1144 static void test_pack_LPSHELLSTATE(void)
1147 TEST_TYPE(LPSHELLSTATE
, 4, 4);
1148 TEST_TYPE_POINTER(LPSHELLSTATE
, 32, 1);
1151 static void test_pack_LPTBINFO(void)
1154 TEST_TYPE(LPTBINFO
, 4, 4);
1155 TEST_TYPE_POINTER(LPTBINFO
, 8, 4);
1158 static void test_pack_PBROWSEINFOA(void)
1161 TEST_TYPE(PBROWSEINFOA
, 4, 4);
1162 TEST_TYPE_POINTER(PBROWSEINFOA
, 32, 4);
1165 static void test_pack_PBROWSEINFOW(void)
1168 TEST_TYPE(PBROWSEINFOW
, 4, 4);
1169 TEST_TYPE_POINTER(PBROWSEINFOW
, 32, 4);
1172 static void test_pack_QCMINFO(void)
1174 /* QCMINFO (pack 8) */
1175 TEST_TYPE(QCMINFO
, 20, 4);
1176 TEST_FIELD(QCMINFO
, HMENU
, hmenu
, 0, 4, 4);
1177 TEST_FIELD(QCMINFO
, UINT
, indexMenu
, 4, 4, 4);
1178 TEST_FIELD(QCMINFO
, UINT
, idCmdFirst
, 8, 4, 4);
1179 TEST_FIELD(QCMINFO
, UINT
, idCmdLast
, 12, 4, 4);
1180 TEST_FIELD(QCMINFO
, QCMINFO_IDMAP
const*, pIdMap
, 16, 4, 4);
1183 static void test_pack_QCMINFO_IDMAP(void)
1185 /* QCMINFO_IDMAP (pack 8) */
1186 TEST_TYPE(QCMINFO_IDMAP
, 12, 4);
1187 TEST_FIELD(QCMINFO_IDMAP
, UINT
, nMaxIds
, 0, 4, 4);
1188 TEST_FIELD(QCMINFO_IDMAP
, QCMINFO_IDMAP_PLACEMENT
[1], pIdList
, 4, 8, 4);
1191 static void test_pack_QCMINFO_IDMAP_PLACEMENT(void)
1193 /* QCMINFO_IDMAP_PLACEMENT (pack 8) */
1194 TEST_TYPE(QCMINFO_IDMAP_PLACEMENT
, 8, 4);
1195 TEST_FIELD(QCMINFO_IDMAP_PLACEMENT
, UINT
, id
, 0, 4, 4);
1196 TEST_FIELD(QCMINFO_IDMAP_PLACEMENT
, UINT
, fFlags
, 4, 4, 4);
1199 static void test_pack_SHChangeDWORDAsIDList(void)
1201 /* SHChangeDWORDAsIDList (pack 1) */
1202 TEST_TYPE(SHChangeDWORDAsIDList
, 12, 1);
1203 TEST_FIELD(SHChangeDWORDAsIDList
, USHORT
, cb
, 0, 2, 1);
1204 TEST_FIELD(SHChangeDWORDAsIDList
, DWORD
, dwItem1
, 2, 4, 1);
1205 TEST_FIELD(SHChangeDWORDAsIDList
, DWORD
, dwItem2
, 6, 4, 1);
1206 TEST_FIELD(SHChangeDWORDAsIDList
, USHORT
, cbZero
, 10, 2, 1);
1209 static void test_pack_SHChangeNotifyEntry(void)
1211 /* SHChangeNotifyEntry (pack 1) */
1212 TEST_TYPE(SHChangeNotifyEntry
, 8, 1);
1213 TEST_FIELD(SHChangeNotifyEntry
, LPCITEMIDLIST
, pidl
, 0, 4, 1);
1214 TEST_FIELD(SHChangeNotifyEntry
, BOOL
, fRecursive
, 4, 4, 1);
1217 static void test_pack_SHChangeProductKeyAsIDList(void)
1219 /* SHChangeProductKeyAsIDList (pack 1) */
1220 TEST_TYPE(SHChangeProductKeyAsIDList
, 82, 1);
1221 TEST_FIELD(SHChangeProductKeyAsIDList
, USHORT
, cb
, 0, 2, 1);
1222 TEST_FIELD(SHChangeProductKeyAsIDList
, WCHAR
[39], wszProductKey
, 2, 78, 1);
1223 TEST_FIELD(SHChangeProductKeyAsIDList
, USHORT
, cbZero
, 80, 2, 1);
1226 static void test_pack_SHDESCRIPTIONID(void)
1228 /* SHDESCRIPTIONID (pack 8) */
1229 TEST_TYPE(SHDESCRIPTIONID
, 20, 4);
1230 TEST_FIELD(SHDESCRIPTIONID
, DWORD
, dwDescriptionId
, 0, 4, 4);
1231 TEST_FIELD(SHDESCRIPTIONID
, CLSID
, clsid
, 4, 16, 4);
1234 static void test_pack_SHELLFLAGSTATE(void)
1236 /* SHELLFLAGSTATE (pack 1) */
1237 TEST_TYPE(SHELLFLAGSTATE
, 4, 1);
1240 static void test_pack_SHELLSTATE(void)
1242 /* SHELLSTATE (pack 1) */
1243 TEST_TYPE(SHELLSTATE
, 32, 1);
1244 TEST_FIELD(SHELLSTATE
, DWORD
, dwWin95Unused
, 4, 4, 1);
1245 TEST_FIELD(SHELLSTATE
, UINT
, uWin95Unused
, 8, 4, 1);
1246 TEST_FIELD(SHELLSTATE
, LONG
, lParamSort
, 12, 4, 1);
1247 TEST_FIELD(SHELLSTATE
, int, iSortDirection
, 16, 4, 1);
1248 TEST_FIELD(SHELLSTATE
, UINT
, version
, 20, 4, 1);
1249 TEST_FIELD(SHELLSTATE
, UINT
, uNotUsed
, 24, 4, 1);
1252 static void test_pack_SHELLVIEWID(void)
1255 TEST_TYPE(SHELLVIEWID
, 16, 4);
1258 static void test_pack_TBINFO(void)
1260 /* TBINFO (pack 8) */
1261 TEST_TYPE(TBINFO
, 8, 4);
1262 TEST_FIELD(TBINFO
, UINT
, cbuttons
, 0, 4, 4);
1263 TEST_FIELD(TBINFO
, UINT
, uFlags
, 4, 4, 4);
1266 static void test_pack(void)
1268 test_pack_APPBARDATA();
1269 test_pack_AUTO_SCROLL_DATA();
1270 test_pack_BFFCALLBACK();
1272 test_pack_BROWSEINFOA();
1273 test_pack_BROWSEINFOW();
1275 test_pack_BSTRBLOB();
1276 test_pack_BYTE_BLOB();
1277 test_pack_BYTE_SIZEDARR();
1278 test_pack_CABINETSTATE();
1280 test_pack_CLIPDATA();
1281 test_pack_CLIPFORMAT();
1283 test_pack_COAUTHIDENTITY();
1284 test_pack_COAUTHINFO();
1285 test_pack_COSERVERINFO();
1287 test_pack_DRAGINFOA();
1288 test_pack_DRAGINFOW();
1289 test_pack_DROPFILES();
1290 test_pack_DWORD_SIZEDARR();
1291 test_pack_FILEDESCRIPTORA();
1292 test_pack_FILEDESCRIPTORW();
1293 test_pack_FILEGROUPDESCRIPTORA();
1294 test_pack_FILEGROUPDESCRIPTORW();
1295 test_pack_FILEOP_FLAGS();
1296 test_pack_FLAGGED_BYTE_BLOB();
1297 test_pack_FLAGGED_WORD_BLOB();
1300 test_pack_HMETAFILEPICT();
1301 test_pack_HYPER_SIZEDARR();
1302 test_pack_IFileSystemBindData();
1303 test_pack_IFileSystemBindDataVtbl();
1305 test_pack_IShellChangeNotify();
1306 test_pack_IShellIcon();
1307 test_pack_ITEMIDLIST();
1309 test_pack_LPBROWSEINFOA();
1310 test_pack_LPBROWSEINFOW();
1312 test_pack_LPBSTRBLOB();
1313 test_pack_LPCABINETSTATE();
1314 test_pack_LPCITEMIDLIST();
1315 test_pack_LPCOLESTR();
1317 test_pack_LPCSHITEMID();
1319 test_pack_LPDECIMAL();
1320 test_pack_LPDRAGINFOA();
1321 test_pack_LPDRAGINFOW();
1322 test_pack_LPDROPFILES();
1323 test_pack_LPFILEDESCRIPTORA();
1324 test_pack_LPFILEDESCRIPTORW();
1325 test_pack_LPFILEGROUPDESCRIPTORA();
1326 test_pack_LPFILEGROUPDESCRIPTORW();
1327 test_pack_LPFNVIEWCALLBACK();
1330 test_pack_LPITEMIDLIST();
1331 test_pack_LPOLESTR();
1332 test_pack_LPQCMINFO();
1333 test_pack_LPSHChangeDWORDAsIDList();
1334 test_pack_LPSHChangeProductKeyAsIDList();
1335 test_pack_LPSHDESCRIPTIONID();
1336 test_pack_LPSHELLDETAILS();
1337 test_pack_LPSHELLEXECUTEINFOA();
1338 test_pack_LPSHELLEXECUTEINFOW();
1339 test_pack_LPSHELLFLAGSTATE();
1340 test_pack_LPSHELLSTATE();
1341 test_pack_LPSHFILEOPSTRUCTA();
1342 test_pack_LPSHFILEOPSTRUCTW();
1343 test_pack_LPSHITEMID();
1344 test_pack_LPSHNAMEMAPPINGA();
1345 test_pack_LPSHNAMEMAPPINGW();
1346 test_pack_LPSTRRET();
1347 test_pack_LPTBINFO();
1348 test_pack_NOTIFYICONDATAA();
1349 test_pack_NOTIFYICONDATAW();
1350 test_pack_OLECHAR();
1351 test_pack_PAPPBARDATA();
1352 test_pack_PBROWSEINFOA();
1353 test_pack_PBROWSEINFOW();
1354 test_pack_PNOTIFYICONDATAA();
1355 test_pack_PNOTIFYICONDATAW();
1356 test_pack_PRINTEROP_FLAGS();
1358 test_pack_QCMINFO();
1359 test_pack_QCMINFO_IDMAP();
1360 test_pack_QCMINFO_IDMAP_PLACEMENT();
1361 test_pack_RemHBITMAP();
1362 test_pack_RemHENHMETAFILE();
1363 test_pack_RemHGLOBAL();
1364 test_pack_RemHMETAFILEPICT();
1365 test_pack_RemHPALETTE();
1367 test_pack_SHChangeDWORDAsIDList();
1368 test_pack_SHChangeNotifyEntry();
1369 test_pack_SHChangeProductKeyAsIDList();
1370 test_pack_SHDESCRIPTIONID();
1371 test_pack_SHELLDETAILS();
1372 test_pack_SHELLEXECUTEINFOA();
1373 test_pack_SHELLEXECUTEINFOW();
1374 test_pack_SHELLFLAGSTATE();
1375 test_pack_SHELLSTATE();
1376 test_pack_SHELLVIEWID();
1377 test_pack_SHFILEINFOA();
1378 test_pack_SHFILEINFOW();
1379 test_pack_SHFILEOPSTRUCTA();
1380 test_pack_SHFILEOPSTRUCTW();
1381 test_pack_SHITEMID();
1382 test_pack_SHNAMEMAPPINGA();
1383 test_pack_SHNAMEMAPPINGW();
1386 test_pack_UP_BYTE_BLOB();
1387 test_pack_UP_FLAGGED_BYTE_BLOB();
1388 test_pack_UP_FLAGGED_WORD_BLOB();
1389 test_pack_VARIANT_BOOL();
1390 test_pack_VARTYPE();
1391 test_pack_WORD_SIZEDARR();
1392 test_pack_remoteMETAFILEPICT();
1393 test_pack_userBITMAP();
1394 test_pack_userCLIPFORMAT();
1395 test_pack_userHBITMAP();
1396 test_pack_userHENHMETAFILE();
1397 test_pack_userHGLOBAL();
1398 test_pack_userHMETAFILE();
1399 test_pack_userHMETAFILEPICT();
1400 test_pack_userHPALETTE();
1401 test_pack_wireBSTR();
1402 test_pack_wireCLIPFORMAT();
1403 test_pack_wireHBITMAP();
1404 test_pack_wireHENHMETAFILE();
1405 test_pack_wireHGLOBAL();
1406 test_pack_wireHMETAFILE();
1407 test_pack_wireHMETAFILEPICT();
1408 test_pack_wireHPALETTE();
1411 START_TEST(generated
)