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
21 #include "wine/test.h"
23 /***********************************************************************
27 #define DWORD_PTR UINT_PTR
28 #define LONG_PTR INT_PTR
29 #define ULONG_PTR UINT_PTR
31 /***********************************************************************
32 * Windows API extension
35 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
36 # define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
37 #elif defined(__GNUC__)
38 # define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
40 /* FIXME: Not sure if is possible to do without compiler extension */
43 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
44 # define _TYPE_ALIGNMENT(type) __alignof(type)
45 #elif defined(__GNUC__)
46 # define _TYPE_ALIGNMENT(type) __alignof__(type)
49 * FIXME: Not sure if is possible to do without compiler extension
50 * (if type is not just a name that is, if so the normal)
51 * TYPE_ALIGNMENT can be used)
55 #if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
56 #pragma warning(disable:4116)
59 #if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
60 # define TYPE_ALIGNMENT _TYPE_ALIGNMENT
63 /***********************************************************************
67 #ifdef FIELD_ALIGNMENT
68 # define TEST_FIELD_ALIGNMENT(type, field, align) \
69 ok(FIELD_ALIGNMENT(type, field) == align, \
70 "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
71 (int)FIELD_ALIGNMENT(type, field))
73 # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
76 #define TEST_FIELD_OFFSET(type, field, offset) \
77 ok(FIELD_OFFSET(type, field) == offset, \
78 "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
79 (long int)FIELD_OFFSET(type, field))
81 #ifdef _TYPE_ALIGNMENT
82 #define TEST__TYPE_ALIGNMENT(type, align) \
83 ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
85 # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
89 #define TEST_TYPE_ALIGNMENT(type, align) \
90 ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
92 # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
95 #define TEST_TYPE_SIZE(type, size) \
96 ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
98 /***********************************************************************
102 #define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
103 TEST_TYPE_SIZE(field_type, field_size); \
104 TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
105 TEST_FIELD_OFFSET(type, field_name, field_offset); \
107 #define TEST_TYPE(type, size, align) \
108 TEST_TYPE_ALIGNMENT(type, align); \
109 TEST_TYPE_SIZE(type, size)
111 #define TEST_TYPE_POINTER(type, size, align) \
112 TEST__TYPE_ALIGNMENT(*(type)0, align); \
113 TEST_TYPE_SIZE(*(type)0, size)
115 #define TEST_TYPE_SIGNED(type) \
116 ok((type) -1 < 0, "(" #type ") -1 < 0\n");
118 #define TEST_TYPE_UNSIGNED(type) \
119 ok((type) -1 > 0, "(" #type ") -1 > 0\n");
121 static void test_pack_I_RPC_HANDLE(void)
124 TEST_TYPE(I_RPC_HANDLE, 4, 4);
127 static void test_pack_RPC_STATUS(void)
130 TEST_TYPE(RPC_STATUS, 4, 4);
131 TEST_TYPE_SIGNED(RPC_STATUS);
134 static void test_pack_PRPC_POLICY(void)
137 TEST_TYPE(PRPC_POLICY, 4, 4);
138 TEST_TYPE_POINTER(PRPC_POLICY, 12, 4);
141 static void test_pack_RPC_AUTH_IDENTITY_HANDLE(void)
143 /* RPC_AUTH_IDENTITY_HANDLE */
144 TEST_TYPE(RPC_AUTH_IDENTITY_HANDLE, 4, 4);
147 static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void)
149 /* RPC_AUTH_KEY_RETRIEVAL_FN */
152 static void test_pack_RPC_AUTHZ_HANDLE(void)
154 /* RPC_AUTHZ_HANDLE */
155 TEST_TYPE(RPC_AUTHZ_HANDLE, 4, 4);
158 static void test_pack_RPC_BINDING_HANDLE(void)
160 /* RPC_BINDING_HANDLE */
161 TEST_TYPE(RPC_BINDING_HANDLE, 4, 4);
164 static void test_pack_RPC_BINDING_VECTOR(void)
166 /* RPC_BINDING_VECTOR (pack 4) */
167 TEST_TYPE(RPC_BINDING_VECTOR, 8, 4);
168 TEST_FIELD(RPC_BINDING_VECTOR, unsigned long, Count, 0, 4, 4);
169 TEST_FIELD(RPC_BINDING_VECTOR, RPC_BINDING_HANDLE[1], BindingH, 4, 4, 4);
172 static void test_pack_RPC_IF_HANDLE(void)
175 TEST_TYPE(RPC_IF_HANDLE, 4, 4);
178 static void test_pack_RPC_IF_ID(void)
180 /* RPC_IF_ID (pack 4) */
183 static void test_pack_RPC_POLICY(void)
185 /* RPC_POLICY (pack 4) */
186 TEST_TYPE(RPC_POLICY, 12, 4);
187 TEST_FIELD(RPC_POLICY, unsigned int, Length, 0, 4, 4);
188 TEST_FIELD(RPC_POLICY, unsigned long, EndpointFlags, 4, 4, 4);
189 TEST_FIELD(RPC_POLICY, unsigned long, NICFlags, 8, 4, 4);
192 static void test_pack_UUID_VECTOR(void)
194 /* UUID_VECTOR (pack 4) */
195 TEST_TYPE(UUID_VECTOR, 8, 4);
196 TEST_FIELD(UUID_VECTOR, unsigned long, Count, 0, 4, 4);
197 TEST_FIELD(UUID_VECTOR, UUID *[1], Uuid, 4, 4, 4);
200 static void test_pack_PRPC_CLIENT_INTERFACE(void)
202 /* PRPC_CLIENT_INTERFACE */
203 TEST_TYPE(PRPC_CLIENT_INTERFACE, 4, 4);
206 static void test_pack_PRPC_DISPATCH_TABLE(void)
208 /* PRPC_DISPATCH_TABLE */
209 TEST_TYPE(PRPC_DISPATCH_TABLE, 4, 4);
210 TEST_TYPE_POINTER(PRPC_DISPATCH_TABLE, 12, 4);
213 static void test_pack_PRPC_MESSAGE(void)
216 TEST_TYPE(PRPC_MESSAGE, 4, 4);
217 TEST_TYPE_POINTER(PRPC_MESSAGE, 44, 4);
220 static void test_pack_PRPC_PROTSEQ_ENDPOINT(void)
222 /* PRPC_PROTSEQ_ENDPOINT */
223 TEST_TYPE(PRPC_PROTSEQ_ENDPOINT, 4, 4);
224 TEST_TYPE_POINTER(PRPC_PROTSEQ_ENDPOINT, 8, 4);
227 static void test_pack_PRPC_SERVER_INTERFACE(void)
229 /* PRPC_SERVER_INTERFACE */
230 TEST_TYPE(PRPC_SERVER_INTERFACE, 4, 4);
233 static void test_pack_PRPC_SYNTAX_IDENTIFIER(void)
235 /* PRPC_SYNTAX_IDENTIFIER */
236 TEST_TYPE(PRPC_SYNTAX_IDENTIFIER, 4, 4);
237 TEST_TYPE_POINTER(PRPC_SYNTAX_IDENTIFIER, 20, 4);
240 static void test_pack_RPC_CLIENT_INTERFACE(void)
242 /* RPC_CLIENT_INTERFACE (pack 4) */
243 TEST_FIELD(RPC_CLIENT_INTERFACE, unsigned int, Length, 0, 4, 4);
246 static void test_pack_RPC_DISPATCH_FUNCTION(void)
248 /* RPC_DISPATCH_FUNCTION */
251 static void test_pack_RPC_DISPATCH_TABLE(void)
253 /* RPC_DISPATCH_TABLE (pack 4) */
254 TEST_TYPE(RPC_DISPATCH_TABLE, 12, 4);
255 TEST_FIELD(RPC_DISPATCH_TABLE, unsigned int, DispatchTableCount, 0, 4, 4);
256 TEST_FIELD(RPC_DISPATCH_TABLE, RPC_DISPATCH_FUNCTION*, DispatchTable, 4, 4, 4);
257 TEST_FIELD(RPC_DISPATCH_TABLE, LONG_PTR, Reserved, 8, 4, 4);
260 static void test_pack_RPC_MESSAGE(void)
262 /* RPC_MESSAGE (pack 4) */
263 TEST_TYPE(RPC_MESSAGE, 44, 4);
264 TEST_FIELD(RPC_MESSAGE, RPC_BINDING_HANDLE, Handle, 0, 4, 4);
265 TEST_FIELD(RPC_MESSAGE, unsigned long, DataRepresentation, 4, 4, 4);
266 TEST_FIELD(RPC_MESSAGE, void*, Buffer, 8, 4, 4);
267 TEST_FIELD(RPC_MESSAGE, unsigned int, BufferLength, 12, 4, 4);
268 TEST_FIELD(RPC_MESSAGE, unsigned int, ProcNum, 16, 4, 4);
269 TEST_FIELD(RPC_MESSAGE, PRPC_SYNTAX_IDENTIFIER, TransferSyntax, 20, 4, 4);
270 TEST_FIELD(RPC_MESSAGE, void*, RpcInterfaceInformation, 24, 4, 4);
271 TEST_FIELD(RPC_MESSAGE, void*, ReservedForRuntime, 28, 4, 4);
272 TEST_FIELD(RPC_MESSAGE, RPC_MGR_EPV*, ManagerEpv, 32, 4, 4);
273 TEST_FIELD(RPC_MESSAGE, void*, ImportContext, 36, 4, 4);
274 TEST_FIELD(RPC_MESSAGE, unsigned long, RpcFlags, 40, 4, 4);
277 static void test_pack_RPC_PROTSEQ_ENDPOINT(void)
279 /* RPC_PROTSEQ_ENDPOINT (pack 4) */
280 TEST_TYPE(RPC_PROTSEQ_ENDPOINT, 8, 4);
281 TEST_FIELD(RPC_PROTSEQ_ENDPOINT, unsigned char*, RpcProtocolSequence, 0, 4, 4);
282 TEST_FIELD(RPC_PROTSEQ_ENDPOINT, unsigned char*, Endpoint, 4, 4, 4);
285 static void test_pack_RPC_SERVER_INTERFACE(void)
287 /* RPC_SERVER_INTERFACE (pack 4) */
288 TEST_FIELD(RPC_SERVER_INTERFACE, unsigned int, Length, 0, 4, 4);
291 static void test_pack_RPC_SYNTAX_IDENTIFIER(void)
293 /* RPC_SYNTAX_IDENTIFIER (pack 4) */
294 TEST_TYPE(RPC_SYNTAX_IDENTIFIER, 20, 4);
295 TEST_FIELD(RPC_SYNTAX_IDENTIFIER, GUID, SyntaxGUID, 0, 16, 4);
296 TEST_FIELD(RPC_SYNTAX_IDENTIFIER, RPC_VERSION, SyntaxVersion, 16, 4, 2);
299 static void test_pack_RPC_VERSION(void)
301 /* RPC_VERSION (pack 4) */
302 TEST_TYPE(RPC_VERSION, 4, 2);
303 TEST_FIELD(RPC_VERSION, unsigned short, MajorVersion, 0, 2, 2);
304 TEST_FIELD(RPC_VERSION, unsigned short, MinorVersion, 2, 2, 2);
307 static void test_pack_ARRAY_INFO(void)
309 /* ARRAY_INFO (pack 4) */
310 TEST_TYPE(ARRAY_INFO, 24, 4);
311 TEST_FIELD(ARRAY_INFO, long, Dimension, 0, 4, 4);
312 TEST_FIELD(ARRAY_INFO, unsigned long *, BufferConformanceMark, 4, 4, 4);
313 TEST_FIELD(ARRAY_INFO, unsigned long *, BufferVarianceMark, 8, 4, 4);
314 TEST_FIELD(ARRAY_INFO, unsigned long *, MaxCountArray, 12, 4, 4);
315 TEST_FIELD(ARRAY_INFO, unsigned long *, OffsetArray, 16, 4, 4);
316 TEST_FIELD(ARRAY_INFO, unsigned long *, ActualCountArray, 20, 4, 4);
319 static void test_pack_COMM_FAULT_OFFSETS(void)
321 /* COMM_FAULT_OFFSETS (pack 4) */
322 TEST_TYPE(COMM_FAULT_OFFSETS, 4, 2);
323 TEST_FIELD(COMM_FAULT_OFFSETS, short, CommOffset, 0, 2, 2);
324 TEST_FIELD(COMM_FAULT_OFFSETS, short, FaultOffset, 2, 2, 2);
327 static void test_pack_CS_STUB_INFO(void)
329 /* CS_STUB_INFO (pack 4) */
330 TEST_TYPE(CS_STUB_INFO, 12, 4);
331 TEST_FIELD(CS_STUB_INFO, unsigned long, WireCodeset, 0, 4, 4);
332 TEST_FIELD(CS_STUB_INFO, unsigned long, DesiredReceivingCodeset, 4, 4, 4);
333 TEST_FIELD(CS_STUB_INFO, void *, CSArrayInfo, 8, 4, 4);
336 static void test_pack_EXPR_EVAL(void)
341 static void test_pack_FULL_PTR_TO_REFID_ELEMENT(void)
343 /* FULL_PTR_TO_REFID_ELEMENT (pack 4) */
344 TEST_TYPE(FULL_PTR_TO_REFID_ELEMENT, 16, 4);
345 TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, struct _FULL_PTR_TO_REFID_ELEMENT *, Next, 0, 4, 4);
346 TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, void *, Pointer, 4, 4, 4);
347 TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, unsigned long, RefId, 8, 4, 4);
348 TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, unsigned char, State, 12, 1, 1);
351 static void test_pack_FULL_PTR_XLAT_TABLES(void)
353 /* FULL_PTR_XLAT_TABLES (pack 4) */
356 static void test_pack_GENERIC_BINDING_INFO(void)
358 /* GENERIC_BINDING_INFO (pack 4) */
359 TEST_FIELD(GENERIC_BINDING_INFO, void *, pObj, 0, 4, 4);
360 TEST_FIELD(GENERIC_BINDING_INFO, unsigned int, Size, 4, 4, 4);
363 static void test_pack_GENERIC_BINDING_ROUTINE_PAIR(void)
365 /* GENERIC_BINDING_ROUTINE_PAIR (pack 4) */
368 static void test_pack_MALLOC_FREE_STRUCT(void)
370 /* MALLOC_FREE_STRUCT (pack 4) */
373 static void test_pack_MIDL_FORMAT_STRING(void)
375 /* MIDL_FORMAT_STRING (pack 4) */
376 TEST_FIELD(MIDL_FORMAT_STRING, short, Pad, 0, 2, 2);
379 static void test_pack_MIDL_SERVER_INFO(void)
381 /* MIDL_SERVER_INFO (pack 4) */
382 TEST_TYPE(MIDL_SERVER_INFO, 32, 4);
383 TEST_FIELD(MIDL_SERVER_INFO, PMIDL_STUB_DESC, pStubDesc, 0, 4, 4);
384 TEST_FIELD(MIDL_SERVER_INFO, SERVER_ROUTINE *, DispatchTable, 4, 4, 4);
385 TEST_FIELD(MIDL_SERVER_INFO, PFORMAT_STRING, ProcString, 8, 4, 4);
386 TEST_FIELD(MIDL_SERVER_INFO, unsigned short *, FmtStringOffset, 12, 4, 4);
387 TEST_FIELD(MIDL_SERVER_INFO, STUB_THUNK *, ThunkTable, 16, 4, 4);
388 TEST_FIELD(MIDL_SERVER_INFO, PRPC_SYNTAX_IDENTIFIER, pTransferSyntax, 20, 4, 4);
389 TEST_FIELD(MIDL_SERVER_INFO, ULONG_PTR, nCount, 24, 4, 4);
390 TEST_FIELD(MIDL_SERVER_INFO, PMIDL_SYNTAX_INFO, pSyntaxInfo, 28, 4, 4);
393 static void test_pack_MIDL_STUB_DESC(void)
395 /* MIDL_STUB_DESC (pack 4) */
396 TEST_FIELD(MIDL_STUB_DESC, void *, RpcInterfaceInformation, 0, 4, 4);
399 static void test_pack_MIDL_STUB_MESSAGE(void)
401 /* MIDL_STUB_MESSAGE (pack 4) */
402 TEST_FIELD(MIDL_STUB_MESSAGE, PRPC_MESSAGE, RpcMsg, 0, 4, 4);
403 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, Buffer, 4, 4, 4);
404 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, BufferStart, 8, 4, 4);
405 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, BufferEnd, 12, 4, 4);
406 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, BufferMark, 16, 4, 4);
407 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, BufferLength, 20, 4, 4);
408 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, MemorySize, 24, 4, 4);
409 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, Memory, 28, 4, 4);
410 TEST_FIELD(MIDL_STUB_MESSAGE, int, IsClient, 32, 4, 4);
411 TEST_FIELD(MIDL_STUB_MESSAGE, int, ReuseBuffer, 36, 4, 4);
412 TEST_FIELD(MIDL_STUB_MESSAGE, struct NDR_ALLOC_ALL_NODES_CONTEXT *, pAllocAllNodesContext, 40, 4, 4);
413 TEST_FIELD(MIDL_STUB_MESSAGE, struct NDR_POINTER_QUEUE_STATE *, pPointerQueueState, 44, 4, 4);
414 TEST_FIELD(MIDL_STUB_MESSAGE, int, IgnoreEmbeddedPointers, 48, 4, 4);
415 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, PointerBufferMark, 52, 4, 4);
416 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char, fBufferValid, 56, 1, 1);
417 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char, uFlags, 57, 1, 1);
418 TEST_FIELD(MIDL_STUB_MESSAGE, ULONG_PTR, MaxCount, 60, 4, 4);
419 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, Offset, 64, 4, 4);
420 TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, ActualCount, 68, 4, 4);
423 static void test_pack_MIDL_STUBLESS_PROXY_INFO(void)
425 /* MIDL_STUBLESS_PROXY_INFO (pack 4) */
426 TEST_TYPE(MIDL_STUBLESS_PROXY_INFO, 24, 4);
427 TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, PMIDL_STUB_DESC, pStubDesc, 0, 4, 4);
428 TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, PFORMAT_STRING, ProcFormatString, 4, 4, 4);
429 TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, unsigned short *, FormatStringOffset, 8, 4, 4);
430 TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, PRPC_SYNTAX_IDENTIFIER, pTransferSyntax, 12, 4, 4);
431 TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, ULONG_PTR, nCount, 16, 4, 4);
432 TEST_FIELD(MIDL_STUBLESS_PROXY_INFO, PMIDL_SYNTAX_INFO, pSyntaxInfo, 20, 4, 4);
435 static void test_pack_MIDL_SYNTAX_INFO(void)
437 /* MIDL_SYNTAX_INFO (pack 4) */
440 static void test_pack_NDR_CCONTEXT(void)
443 TEST_TYPE(NDR_CCONTEXT, 4, 4);
446 static void test_pack_NDR_NOTIFY_ROUTINE(void)
448 /* NDR_NOTIFY_ROUTINE */
451 static void test_pack_NDR_NOTIFY2_ROUTINE(void)
453 /* NDR_NOTIFY2_ROUTINE */
456 static void test_pack_NDR_RUNDOWN(void)
461 static void test_pack_NDR_SCONTEXT(void)
464 TEST_TYPE(NDR_SCONTEXT, 4, 4);
467 static void test_pack_PARRAY_INFO(void)
470 TEST_TYPE(PARRAY_INFO, 4, 4);
471 TEST_TYPE_POINTER(PARRAY_INFO, 24, 4);
474 static void test_pack_PFORMAT_STRING(void)
477 TEST_TYPE(PFORMAT_STRING, 4, 4);
480 static void test_pack_PFULL_PTR_TO_REFID_ELEMENT(void)
482 /* PFULL_PTR_TO_REFID_ELEMENT */
483 TEST_TYPE(PFULL_PTR_TO_REFID_ELEMENT, 4, 4);
484 TEST_TYPE_POINTER(PFULL_PTR_TO_REFID_ELEMENT, 16, 4);
487 static void test_pack_PFULL_PTR_XLAT_TABLES(void)
489 /* PFULL_PTR_XLAT_TABLES */
490 TEST_TYPE(PFULL_PTR_XLAT_TABLES, 4, 4);
493 static void test_pack_PGENERIC_BINDING_INFO(void)
495 /* PGENERIC_BINDING_INFO */
496 TEST_TYPE(PGENERIC_BINDING_INFO, 4, 4);
499 static void test_pack_PGENERIC_BINDING_ROUTINE_PAIR(void)
501 /* PGENERIC_BINDING_ROUTINE_PAIR */
502 TEST_TYPE(PGENERIC_BINDING_ROUTINE_PAIR, 4, 4);
505 static void test_pack_PMIDL_SERVER_INFO(void)
507 /* PMIDL_SERVER_INFO */
508 TEST_TYPE(PMIDL_SERVER_INFO, 4, 4);
509 TEST_TYPE_POINTER(PMIDL_SERVER_INFO, 32, 4);
512 static void test_pack_PMIDL_STUB_DESC(void)
514 /* PMIDL_STUB_DESC */
515 TEST_TYPE(PMIDL_STUB_DESC, 4, 4);
518 static void test_pack_PMIDL_STUB_MESSAGE(void)
520 /* PMIDL_STUB_MESSAGE */
521 TEST_TYPE(PMIDL_STUB_MESSAGE, 4, 4);
524 static void test_pack_PMIDL_STUBLESS_PROXY_INFO(void)
526 /* PMIDL_STUBLESS_PROXY_INFO */
527 TEST_TYPE(PMIDL_STUBLESS_PROXY_INFO, 4, 4);
528 TEST_TYPE_POINTER(PMIDL_STUBLESS_PROXY_INFO, 24, 4);
531 static void test_pack_PMIDL_SYNTAX_INFO(void)
533 /* PMIDL_SYNTAX_INFO */
534 TEST_TYPE(PMIDL_SYNTAX_INFO, 4, 4);
537 static void test_pack_PNDR_ASYNC_MESSAGE(void)
539 /* PNDR_ASYNC_MESSAGE */
540 TEST_TYPE(PNDR_ASYNC_MESSAGE, 4, 4);
543 static void test_pack_PNDR_CORRELATION_INFO(void)
545 /* PNDR_CORRELATION_INFO */
546 TEST_TYPE(PNDR_CORRELATION_INFO, 4, 4);
549 static void test_pack_PSCONTEXT_QUEUE(void)
551 /* PSCONTEXT_QUEUE */
552 TEST_TYPE(PSCONTEXT_QUEUE, 4, 4);
553 TEST_TYPE_POINTER(PSCONTEXT_QUEUE, 8, 4);
556 static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void)
558 /* PXMIT_ROUTINE_QUINTUPLE */
559 TEST_TYPE(PXMIT_ROUTINE_QUINTUPLE, 4, 4);
562 static void test_pack_SCONTEXT_QUEUE(void)
564 /* SCONTEXT_QUEUE (pack 4) */
565 TEST_TYPE(SCONTEXT_QUEUE, 8, 4);
566 TEST_FIELD(SCONTEXT_QUEUE, unsigned long, NumberOfObjects, 0, 4, 4);
567 TEST_FIELD(SCONTEXT_QUEUE, NDR_SCONTEXT *, ArrayOfObjects, 4, 4, 4);
570 static void test_pack_SERVER_ROUTINE(void)
575 static void test_pack_STUB_THUNK(void)
580 static void test_pack_USER_MARSHAL_CB(void)
582 /* USER_MARSHAL_CB (pack 4) */
583 TEST_FIELD(USER_MARSHAL_CB, unsigned long, Flags, 0, 4, 4);
584 TEST_FIELD(USER_MARSHAL_CB, PMIDL_STUB_MESSAGE, pStubMsg, 4, 4, 4);
585 TEST_FIELD(USER_MARSHAL_CB, PFORMAT_STRING, pReserve, 8, 4, 4);
586 TEST_FIELD(USER_MARSHAL_CB, unsigned long, Signature, 12, 4, 4);
589 static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void)
591 /* USER_MARSHAL_FREEING_ROUTINE */
594 static void test_pack_USER_MARSHAL_MARSHALLING_ROUTINE(void)
596 /* USER_MARSHAL_MARSHALLING_ROUTINE */
599 static void test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE(void)
601 /* USER_MARSHAL_ROUTINE_QUADRUPLE (pack 4) */
604 static void test_pack_USER_MARSHAL_SIZING_ROUTINE(void)
606 /* USER_MARSHAL_SIZING_ROUTINE */
609 static void test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE(void)
611 /* USER_MARSHAL_UNMARSHALLING_ROUTINE */
614 static void test_pack_XMIT_HELPER_ROUTINE(void)
616 /* XMIT_HELPER_ROUTINE */
619 static void test_pack_XMIT_ROUTINE_QUINTUPLE(void)
621 /* XMIT_ROUTINE_QUINTUPLE (pack 4) */
624 static void test_pack_PRPC_STUB_FUNCTION(void)
626 /* PRPC_STUB_FUNCTION */
629 static void test_pack(void)
631 test_pack_ARRAY_INFO();
632 test_pack_COMM_FAULT_OFFSETS();
633 test_pack_CS_STUB_INFO();
634 test_pack_EXPR_EVAL();
635 test_pack_FULL_PTR_TO_REFID_ELEMENT();
636 test_pack_FULL_PTR_XLAT_TABLES();
637 test_pack_GENERIC_BINDING_INFO();
638 test_pack_GENERIC_BINDING_ROUTINE_PAIR();
639 test_pack_I_RPC_HANDLE();
640 test_pack_MALLOC_FREE_STRUCT();
641 test_pack_MIDL_FORMAT_STRING();
642 test_pack_MIDL_SERVER_INFO();
643 test_pack_MIDL_STUBLESS_PROXY_INFO();
644 test_pack_MIDL_STUB_DESC();
645 test_pack_MIDL_STUB_MESSAGE();
646 test_pack_MIDL_SYNTAX_INFO();
647 test_pack_NDR_CCONTEXT();
648 test_pack_NDR_NOTIFY2_ROUTINE();
649 test_pack_NDR_NOTIFY_ROUTINE();
650 test_pack_NDR_RUNDOWN();
651 test_pack_NDR_SCONTEXT();
652 test_pack_PARRAY_INFO();
653 test_pack_PFORMAT_STRING();
654 test_pack_PFULL_PTR_TO_REFID_ELEMENT();
655 test_pack_PFULL_PTR_XLAT_TABLES();
656 test_pack_PGENERIC_BINDING_INFO();
657 test_pack_PGENERIC_BINDING_ROUTINE_PAIR();
658 test_pack_PMIDL_SERVER_INFO();
659 test_pack_PMIDL_STUBLESS_PROXY_INFO();
660 test_pack_PMIDL_STUB_DESC();
661 test_pack_PMIDL_STUB_MESSAGE();
662 test_pack_PMIDL_SYNTAX_INFO();
663 test_pack_PNDR_ASYNC_MESSAGE();
664 test_pack_PNDR_CORRELATION_INFO();
665 test_pack_PRPC_CLIENT_INTERFACE();
666 test_pack_PRPC_DISPATCH_TABLE();
667 test_pack_PRPC_MESSAGE();
668 test_pack_PRPC_POLICY();
669 test_pack_PRPC_PROTSEQ_ENDPOINT();
670 test_pack_PRPC_SERVER_INTERFACE();
671 test_pack_PRPC_STUB_FUNCTION();
672 test_pack_PRPC_SYNTAX_IDENTIFIER();
673 test_pack_PSCONTEXT_QUEUE();
674 test_pack_PXMIT_ROUTINE_QUINTUPLE();
675 test_pack_RPC_AUTHZ_HANDLE();
676 test_pack_RPC_AUTH_IDENTITY_HANDLE();
677 test_pack_RPC_AUTH_KEY_RETRIEVAL_FN();
678 test_pack_RPC_BINDING_HANDLE();
679 test_pack_RPC_BINDING_VECTOR();
680 test_pack_RPC_CLIENT_INTERFACE();
681 test_pack_RPC_DISPATCH_FUNCTION();
682 test_pack_RPC_DISPATCH_TABLE();
683 test_pack_RPC_IF_HANDLE();
684 test_pack_RPC_IF_ID();
685 test_pack_RPC_MESSAGE();
686 test_pack_RPC_POLICY();
687 test_pack_RPC_PROTSEQ_ENDPOINT();
688 test_pack_RPC_SERVER_INTERFACE();
689 test_pack_RPC_STATUS();
690 test_pack_RPC_SYNTAX_IDENTIFIER();
691 test_pack_RPC_VERSION();
692 test_pack_SCONTEXT_QUEUE();
693 test_pack_SERVER_ROUTINE();
694 test_pack_STUB_THUNK();
695 test_pack_USER_MARSHAL_CB();
696 test_pack_USER_MARSHAL_FREEING_ROUTINE();
697 test_pack_USER_MARSHAL_MARSHALLING_ROUTINE();
698 test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE();
699 test_pack_USER_MARSHAL_SIZING_ROUTINE();
700 test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE();
701 test_pack_UUID_VECTOR();
702 test_pack_XMIT_HELPER_ROUTINE();
703 test_pack_XMIT_ROUTINE_QUINTUPLE();
706 START_TEST(generated)