ReactOS 0.4.16-dev-197-g92996da
generated.c
Go to the documentation of this file.
1/* File generated automatically from tools/winapi/tests.dat; do not edit! */
2/* This file can be copied, modified and distributed without restriction. */
3
4/*
5 * Unit tests for data structure packing
6 */
7
8#define WINE_NOWINSOCK
9
10#include <stdarg.h>
11#include "windef.h"
12#include "winbase.h"
13#include "ole2.h"
14#include "rpc.h"
15#include "rpcndr.h"
16#include "rpcproxy.h"
17
18#include "wine/test.h"
19
20/***********************************************************************
21 * Compatibility macros
22 */
23
24#define DWORD_PTR UINT_PTR
25#define LONG_PTR INT_PTR
26#define ULONG_PTR UINT_PTR
27
28/***********************************************************************
29 * Windows API extension
30 */
31
32#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
33# define _TYPE_ALIGNMENT(type) __alignof(type)
34#elif defined(__GNUC__)
35# define _TYPE_ALIGNMENT(type) __alignof__(type)
36#else
37/*
38 * FIXME: May not be possible without a compiler extension
39 * (if type is not just a name that is, otherwise the normal
40 * TYPE_ALIGNMENT can be used)
41 */
42#endif
43
44#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
45#pragma warning(disable:4116)
46#endif
47
48#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
49# define TYPE_ALIGNMENT _TYPE_ALIGNMENT
50#endif
51
52/***********************************************************************
53 * Test helper macros
54 */
55
56#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size);
57
58#ifdef TYPE_ALIGNMENT
59# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
60#else
61# define TEST_TYPE_ALIGN(type, align)
62#endif
63
64#ifdef _TYPE_ALIGNMENT
65# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
66# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
67#else
68# define TEST_TARGET_ALIGN(type, align)
69# define TEST_FIELD_ALIGN(type, field, align)
70#endif
71
72#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
73
74#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size)
75#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size)
76#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0);
77#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0);
78
79
80#ifdef _WIN64
81
82static void test_pack_I_RPC_HANDLE(void)
83{
84 /* I_RPC_HANDLE */
87}
88
89static void test_pack_RPC_STATUS(void)
90{
91 /* RPC_STATUS */
94}
95
96static void test_pack_PRPC_POLICY(void)
97{
98 /* PRPC_POLICY */
103}
104
106{
107 /* RPC_AUTH_IDENTITY_HANDLE */
110}
111
113{
114 /* RPC_AUTH_KEY_RETRIEVAL_FN */
115}
116
117static void test_pack_RPC_AUTHZ_HANDLE(void)
118{
119 /* RPC_AUTHZ_HANDLE */
122}
123
124static void test_pack_RPC_BINDING_HANDLE(void)
125{
126 /* RPC_BINDING_HANDLE */
129}
130
131static void test_pack_RPC_BINDING_VECTOR(void)
132{
133 /* RPC_BINDING_VECTOR */
142}
143
144static void test_pack_RPC_IF_HANDLE(void)
145{
146 /* RPC_IF_HANDLE */
149}
150
151static void test_pack_RPC_IF_ID(void)
152{
153 /* RPC_IF_ID */
156 TEST_FIELD_SIZE (RPC_IF_ID, Uuid, 16)
157 TEST_FIELD_ALIGN (RPC_IF_ID, Uuid, 4)
159 TEST_FIELD_SIZE (RPC_IF_ID, VersMajor, 2)
160 TEST_FIELD_ALIGN (RPC_IF_ID, VersMajor, 2)
161 TEST_FIELD_OFFSET(RPC_IF_ID, VersMajor, 16)
162 TEST_FIELD_SIZE (RPC_IF_ID, VersMinor, 2)
163 TEST_FIELD_ALIGN (RPC_IF_ID, VersMinor, 2)
164 TEST_FIELD_OFFSET(RPC_IF_ID, VersMinor, 18)
165}
166
167static void test_pack_RPC_POLICY(void)
168{
169 /* RPC_POLICY */
175 TEST_FIELD_SIZE (RPC_POLICY, EndpointFlags, 4)
176 TEST_FIELD_ALIGN (RPC_POLICY, EndpointFlags, 4)
177 TEST_FIELD_OFFSET(RPC_POLICY, EndpointFlags, 4)
178 TEST_FIELD_SIZE (RPC_POLICY, NICFlags, 4)
179 TEST_FIELD_ALIGN (RPC_POLICY, NICFlags, 4)
180 TEST_FIELD_OFFSET(RPC_POLICY, NICFlags, 8)
181}
182
183static void test_pack_UUID_VECTOR(void)
184{
185 /* UUID_VECTOR */
194}
195
196static void test_pack_PRPC_CLIENT_INTERFACE(void)
197{
198 /* PRPC_CLIENT_INTERFACE */
203}
204
205static void test_pack_PRPC_DISPATCH_TABLE(void)
206{
207 /* PRPC_DISPATCH_TABLE */
212}
213
214static void test_pack_PRPC_MESSAGE(void)
215{
216 /* PRPC_MESSAGE */
221}
222
223static void test_pack_PRPC_PROTSEQ_ENDPOINT(void)
224{
225 /* PRPC_PROTSEQ_ENDPOINT */
230}
231
232static void test_pack_PRPC_SERVER_INTERFACE(void)
233{
234 /* PRPC_SERVER_INTERFACE */
239}
240
241static void test_pack_PRPC_SYNTAX_IDENTIFIER(void)
242{
243 /* PRPC_SYNTAX_IDENTIFIER */
248}
249
250static void test_pack_RPC_CLIENT_INTERFACE(void)
251{
252 /* RPC_CLIENT_INTERFACE */
258 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterfaceId, 20)
259 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterfaceId, 4)
261 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, TransferSyntax, 20)
262 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, TransferSyntax, 4)
263 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, TransferSyntax, 24)
267 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
268 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
269 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 56)
270 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 8)
271 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 8)
272 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 64)
276 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterpreterInfo, 8)
277 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterpreterInfo, 8)
278 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterpreterInfo, 80)
282}
283
284static void test_pack_RPC_DISPATCH_FUNCTION(void)
285{
286 /* RPC_DISPATCH_FUNCTION */
287}
288
289static void test_pack_RPC_DISPATCH_TABLE(void)
290{
291 /* RPC_DISPATCH_TABLE */
294 TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
295 TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
296 TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTableCount, 0)
303}
304
305static void test_pack_RPC_MESSAGE(void)
306{
307 /* RPC_MESSAGE */
313 TEST_FIELD_SIZE (RPC_MESSAGE, DataRepresentation, 4)
314 TEST_FIELD_ALIGN (RPC_MESSAGE, DataRepresentation, 4)
315 TEST_FIELD_OFFSET(RPC_MESSAGE, DataRepresentation, 8)
322 TEST_FIELD_SIZE (RPC_MESSAGE, ProcNum, 4)
323 TEST_FIELD_ALIGN (RPC_MESSAGE, ProcNum, 4)
324 TEST_FIELD_OFFSET(RPC_MESSAGE, ProcNum, 28)
325 TEST_FIELD_SIZE (RPC_MESSAGE, TransferSyntax, 8)
326 TEST_FIELD_ALIGN (RPC_MESSAGE, TransferSyntax, 8)
327 TEST_FIELD_OFFSET(RPC_MESSAGE, TransferSyntax, 32)
328 TEST_FIELD_SIZE (RPC_MESSAGE, RpcInterfaceInformation, 8)
329 TEST_FIELD_ALIGN (RPC_MESSAGE, RpcInterfaceInformation, 8)
330 TEST_FIELD_OFFSET(RPC_MESSAGE, RpcInterfaceInformation, 40)
331 TEST_FIELD_SIZE (RPC_MESSAGE, ReservedForRuntime, 8)
332 TEST_FIELD_ALIGN (RPC_MESSAGE, ReservedForRuntime, 8)
333 TEST_FIELD_OFFSET(RPC_MESSAGE, ReservedForRuntime, 48)
334 TEST_FIELD_SIZE (RPC_MESSAGE, ManagerEpv, 8)
335 TEST_FIELD_ALIGN (RPC_MESSAGE, ManagerEpv, 8)
336 TEST_FIELD_OFFSET(RPC_MESSAGE, ManagerEpv, 56)
337 TEST_FIELD_SIZE (RPC_MESSAGE, ImportContext, 8)
338 TEST_FIELD_ALIGN (RPC_MESSAGE, ImportContext, 8)
339 TEST_FIELD_OFFSET(RPC_MESSAGE, ImportContext, 64)
340 TEST_FIELD_SIZE (RPC_MESSAGE, RpcFlags, 4)
341 TEST_FIELD_ALIGN (RPC_MESSAGE, RpcFlags, 4)
342 TEST_FIELD_OFFSET(RPC_MESSAGE, RpcFlags, 72)
343}
344
345static void test_pack_RPC_PROTSEQ_ENDPOINT(void)
346{
347 /* RPC_PROTSEQ_ENDPOINT */
350 TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 8)
351 TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 8)
352 TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 0)
356}
357
358static void test_pack_RPC_SERVER_INTERFACE(void)
359{
360 /* RPC_SERVER_INTERFACE */
366 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterfaceId, 20)
367 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterfaceId, 4)
369 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, TransferSyntax, 20)
370 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, TransferSyntax, 4)
371 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, TransferSyntax, 24)
375 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
376 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
377 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 56)
378 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 8)
379 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 8)
380 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 64)
381 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DefaultManagerEpv, 8)
382 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DefaultManagerEpv, 8)
383 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DefaultManagerEpv, 72)
384 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterpreterInfo, 8)
385 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterpreterInfo, 8)
386 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterpreterInfo, 80)
390}
391
392static void test_pack_RPC_SYNTAX_IDENTIFIER(void)
393{
394 /* RPC_SYNTAX_IDENTIFIER */
397 TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 16)
400 TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 4)
401 TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 2)
402 TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 16)
403}
404
405static void test_pack_RPC_VERSION(void)
406{
407 /* RPC_VERSION */
416}
417
418static void test_pack_ARRAY_INFO(void)
419{
420 /* ARRAY_INFO */
423 TEST_FIELD_SIZE (ARRAY_INFO, Dimension, 4)
424 TEST_FIELD_ALIGN (ARRAY_INFO, Dimension, 4)
425 TEST_FIELD_OFFSET(ARRAY_INFO, Dimension, 0)
426 TEST_FIELD_SIZE (ARRAY_INFO, BufferConformanceMark, 8)
427 TEST_FIELD_ALIGN (ARRAY_INFO, BufferConformanceMark, 8)
428 TEST_FIELD_OFFSET(ARRAY_INFO, BufferConformanceMark, 8)
429 TEST_FIELD_SIZE (ARRAY_INFO, BufferVarianceMark, 8)
430 TEST_FIELD_ALIGN (ARRAY_INFO, BufferVarianceMark, 8)
431 TEST_FIELD_OFFSET(ARRAY_INFO, BufferVarianceMark, 16)
432 TEST_FIELD_SIZE (ARRAY_INFO, MaxCountArray, 8)
433 TEST_FIELD_ALIGN (ARRAY_INFO, MaxCountArray, 8)
434 TEST_FIELD_OFFSET(ARRAY_INFO, MaxCountArray, 24)
435 TEST_FIELD_SIZE (ARRAY_INFO, OffsetArray, 8)
436 TEST_FIELD_ALIGN (ARRAY_INFO, OffsetArray, 8)
437 TEST_FIELD_OFFSET(ARRAY_INFO, OffsetArray, 32)
438 TEST_FIELD_SIZE (ARRAY_INFO, ActualCountArray, 8)
439 TEST_FIELD_ALIGN (ARRAY_INFO, ActualCountArray, 8)
440 TEST_FIELD_OFFSET(ARRAY_INFO, ActualCountArray, 40)
441}
442
443static void test_pack_COMM_FAULT_OFFSETS(void)
444{
445 /* COMM_FAULT_OFFSETS */
448 TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, CommOffset, 2)
449 TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, CommOffset, 2)
451 TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, FaultOffset, 2)
452 TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, FaultOffset, 2)
454}
455
456static void test_pack_CS_STUB_INFO(void)
457{
458 /* CS_STUB_INFO */
461 TEST_FIELD_SIZE (CS_STUB_INFO, WireCodeset, 4)
462 TEST_FIELD_ALIGN (CS_STUB_INFO, WireCodeset, 4)
463 TEST_FIELD_OFFSET(CS_STUB_INFO, WireCodeset, 0)
464 TEST_FIELD_SIZE (CS_STUB_INFO, DesiredReceivingCodeset, 4)
465 TEST_FIELD_ALIGN (CS_STUB_INFO, DesiredReceivingCodeset, 4)
466 TEST_FIELD_OFFSET(CS_STUB_INFO, DesiredReceivingCodeset, 4)
467 TEST_FIELD_SIZE (CS_STUB_INFO, CSArrayInfo, 8)
468 TEST_FIELD_ALIGN (CS_STUB_INFO, CSArrayInfo, 8)
469 TEST_FIELD_OFFSET(CS_STUB_INFO, CSArrayInfo, 8)
470}
471
472static void test_pack_EXPR_EVAL(void)
473{
474 /* EXPR_EVAL */
475}
476
478{
479 /* FULL_PTR_TO_REFID_ELEMENT */
494}
495
496static void test_pack_FULL_PTR_XLAT_TABLES(void)
497{
498 /* FULL_PTR_XLAT_TABLES */
499}
500
501static void test_pack_GENERIC_BINDING_INFO(void)
502{
503 /* GENERIC_BINDING_INFO */
510}
511
513{
514 /* GENERIC_BINDING_ROUTINE_PAIR */
515}
516
517static void test_pack_MALLOC_FREE_STRUCT(void)
518{
519 /* MALLOC_FREE_STRUCT */
520}
521
522static void test_pack_MIDL_FORMAT_STRING(void)
523{
524 /* MIDL_FORMAT_STRING */
528}
529
530static void test_pack_MIDL_SERVER_INFO(void)
531{
532 /* MIDL_SERVER_INFO */
535 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pStubDesc, 8)
536 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pStubDesc, 8)
541 TEST_FIELD_SIZE (MIDL_SERVER_INFO, ProcString, 8)
542 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ProcString, 8)
543 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ProcString, 16)
544 TEST_FIELD_SIZE (MIDL_SERVER_INFO, FmtStringOffset, 8)
545 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, FmtStringOffset, 8)
546 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, FmtStringOffset, 24)
547 TEST_FIELD_SIZE (MIDL_SERVER_INFO, ThunkTable, 8)
548 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ThunkTable, 8)
549 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ThunkTable, 32)
550 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pTransferSyntax, 8)
551 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pTransferSyntax, 8)
552 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pTransferSyntax, 40)
556 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pSyntaxInfo, 8)
557 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pSyntaxInfo, 8)
558 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pSyntaxInfo, 56)
559}
560
561static void test_pack_MIDL_STUB_DESC(void)
562{
563 /* MIDL_STUB_DESC */
564 TEST_FIELD_SIZE (MIDL_STUB_DESC, RpcInterfaceInformation, 8)
565 TEST_FIELD_ALIGN (MIDL_STUB_DESC, RpcInterfaceInformation, 8)
566 TEST_FIELD_OFFSET(MIDL_STUB_DESC, RpcInterfaceInformation, 0)
567}
568
569static void test_pack_MIDL_STUB_MESSAGE(void)
570{
571 /* MIDL_STUB_MESSAGE */
578 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferStart, 8)
579 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferStart, 8)
580 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferStart, 16)
584 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferMark, 8)
585 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferMark, 8)
586 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferMark, 32)
596 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
597 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
598 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ReuseBuffer, 60)
599 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 8)
600 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 8)
601 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pAllocAllNodesContext, 64)
602 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pPointerQueueState, 8)
603 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pPointerQueueState, 8)
604 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pPointerQueueState, 72)
605 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
606 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
607 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 80)
608 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, PointerBufferMark, 8)
609 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, PointerBufferMark, 8)
610 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, PointerBufferMark, 88)
611 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
612 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
613 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, CorrDespIncrement, 96)
623 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ActualCount, 4)
624 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ActualCount, 4)
625 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ActualCount, 116)
626}
627
629{
630 /* MIDL_STUBLESS_PROXY_INFO */
636 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 8)
637 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 8)
638 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 8)
639 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8)
640 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8)
641 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 16)
642 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 8)
643 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 8)
644 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 24)
651}
652
653static void test_pack_MIDL_SYNTAX_INFO(void)
654{
655 /* MIDL_SYNTAX_INFO */
658 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TransferSyntax, 20)
659 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TransferSyntax, 4)
660 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TransferSyntax, 0)
664 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, ProcString, 8)
665 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, ProcString, 8)
666 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, ProcString, 32)
667 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, FmtStringOffset, 8)
668 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, FmtStringOffset, 8)
669 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, FmtStringOffset, 40)
670 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TypeString, 8)
671 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TypeString, 8)
672 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TypeString, 48)
673 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 8)
674 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 8)
675 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 56)
676 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved1, 8)
677 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved1, 8)
678 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved1, 64)
679 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved2, 8)
680 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved2, 8)
681 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved2, 72)
682}
683
684static void test_pack_NDR_CCONTEXT(void)
685{
686 /* NDR_CCONTEXT */
689}
690
691static void test_pack_NDR_NOTIFY_ROUTINE(void)
692{
693 /* NDR_NOTIFY_ROUTINE */
694}
695
696static void test_pack_NDR_NOTIFY2_ROUTINE(void)
697{
698 /* NDR_NOTIFY2_ROUTINE */
699}
700
701static void test_pack_NDR_RUNDOWN(void)
702{
703 /* NDR_RUNDOWN */
704}
705
706static void test_pack_NDR_SCONTEXT(void)
707{
708 /* NDR_SCONTEXT */
711}
712
713static void test_pack_NDR_USER_MARSHAL_INFO(void)
714{
715 /* NDR_USER_MARSHAL_INFO */
716 TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
717 TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
718 TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO, InformationLevel, 0)
719}
720
722{
723 /* NDR_USER_MARSHAL_INFO_LEVEL1 */
730}
731
732static void test_pack_PARRAY_INFO(void)
733{
734 /* PARRAY_INFO */
739}
740
741static void test_pack_PFORMAT_STRING(void)
742{
743 /* PFORMAT_STRING */
746}
747
749{
750 /* PFULL_PTR_TO_REFID_ELEMENT */
755}
756
757static void test_pack_PFULL_PTR_XLAT_TABLES(void)
758{
759 /* PFULL_PTR_XLAT_TABLES */
762}
763
764static void test_pack_PGENERIC_BINDING_INFO(void)
765{
766 /* PGENERIC_BINDING_INFO */
769}
770
772{
773 /* PGENERIC_BINDING_ROUTINE_PAIR */
776}
777
778static void test_pack_PMIDL_SERVER_INFO(void)
779{
780 /* PMIDL_SERVER_INFO */
785}
786
787static void test_pack_PMIDL_STUB_DESC(void)
788{
789 /* PMIDL_STUB_DESC */
792}
793
794static void test_pack_PMIDL_STUB_MESSAGE(void)
795{
796 /* PMIDL_STUB_MESSAGE */
799}
800
802{
803 /* PMIDL_STUBLESS_PROXY_INFO */
808}
809
810static void test_pack_PMIDL_SYNTAX_INFO(void)
811{
812 /* PMIDL_SYNTAX_INFO */
817}
818
819static void test_pack_PNDR_ASYNC_MESSAGE(void)
820{
821 /* PNDR_ASYNC_MESSAGE */
824}
825
826static void test_pack_PNDR_CORRELATION_INFO(void)
827{
828 /* PNDR_CORRELATION_INFO */
831}
832
833static void test_pack_PSCONTEXT_QUEUE(void)
834{
835 /* PSCONTEXT_QUEUE */
840}
841
842static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void)
843{
844 /* PXMIT_ROUTINE_QUINTUPLE */
847}
848
849static void test_pack_SCONTEXT_QUEUE(void)
850{
851 /* SCONTEXT_QUEUE */
854 TEST_FIELD_SIZE (SCONTEXT_QUEUE, NumberOfObjects, 4)
855 TEST_FIELD_ALIGN (SCONTEXT_QUEUE, NumberOfObjects, 4)
856 TEST_FIELD_OFFSET(SCONTEXT_QUEUE, NumberOfObjects, 0)
857 TEST_FIELD_SIZE (SCONTEXT_QUEUE, ArrayOfObjects, 8)
858 TEST_FIELD_ALIGN (SCONTEXT_QUEUE, ArrayOfObjects, 8)
859 TEST_FIELD_OFFSET(SCONTEXT_QUEUE, ArrayOfObjects, 8)
860}
861
862static void test_pack_SERVER_ROUTINE(void)
863{
864 /* SERVER_ROUTINE */
865}
866
867static void test_pack_STUB_THUNK(void)
868{
869 /* STUB_THUNK */
870}
871
872static void test_pack_USER_MARSHAL_CB(void)
873{
874 /* USER_MARSHAL_CB */
878 TEST_FIELD_SIZE (USER_MARSHAL_CB, pStubMsg, 8)
879 TEST_FIELD_ALIGN (USER_MARSHAL_CB, pStubMsg, 8)
881 TEST_FIELD_SIZE (USER_MARSHAL_CB, pReserve, 8)
882 TEST_FIELD_ALIGN (USER_MARSHAL_CB, pReserve, 8)
887}
888
890{
891 /* USER_MARSHAL_FREEING_ROUTINE */
892}
893
895{
896 /* USER_MARSHAL_MARSHALLING_ROUTINE */
897}
898
900{
901 /* USER_MARSHAL_ROUTINE_QUADRUPLE */
902}
903
905{
906 /* USER_MARSHAL_SIZING_ROUTINE */
907}
908
910{
911 /* USER_MARSHAL_UNMARSHALLING_ROUTINE */
912}
913
914static void test_pack_XMIT_HELPER_ROUTINE(void)
915{
916 /* XMIT_HELPER_ROUTINE */
917}
918
919static void test_pack_XMIT_ROUTINE_QUINTUPLE(void)
920{
921 /* XMIT_ROUTINE_QUINTUPLE */
922}
923
924static void test_pack_PRPC_STUB_FUNCTION(void)
925{
926 /* PRPC_STUB_FUNCTION */
927}
928
929#else /* _WIN64 */
930
931static void test_pack_I_RPC_HANDLE(void)
932{
933 /* I_RPC_HANDLE */
936}
937
938static void test_pack_RPC_STATUS(void)
939{
940 /* RPC_STATUS */
943}
944
945static void test_pack_PRPC_POLICY(void)
946{
947 /* PRPC_POLICY */
952}
953
955{
956 /* RPC_AUTH_IDENTITY_HANDLE */
959}
960
962{
963 /* RPC_AUTH_KEY_RETRIEVAL_FN */
964}
965
967{
968 /* RPC_AUTHZ_HANDLE */
971}
972
974{
975 /* RPC_BINDING_HANDLE */
978}
979
981{
982 /* RPC_BINDING_VECTOR */
991}
992
993static void test_pack_RPC_IF_HANDLE(void)
994{
995 /* RPC_IF_HANDLE */
998}
999
1000static void test_pack_RPC_IF_ID(void)
1001{
1002 /* RPC_IF_ID */
1005 TEST_FIELD_SIZE (RPC_IF_ID, Uuid, 16)
1006 TEST_FIELD_ALIGN (RPC_IF_ID, Uuid, 4)
1008 TEST_FIELD_SIZE (RPC_IF_ID, VersMajor, 2)
1009 TEST_FIELD_ALIGN (RPC_IF_ID, VersMajor, 2)
1010 TEST_FIELD_OFFSET(RPC_IF_ID, VersMajor, 16)
1011 TEST_FIELD_SIZE (RPC_IF_ID, VersMinor, 2)
1012 TEST_FIELD_ALIGN (RPC_IF_ID, VersMinor, 2)
1013 TEST_FIELD_OFFSET(RPC_IF_ID, VersMinor, 18)
1014}
1015
1016static void test_pack_RPC_POLICY(void)
1017{
1018 /* RPC_POLICY */
1024 TEST_FIELD_SIZE (RPC_POLICY, EndpointFlags, 4)
1025 TEST_FIELD_ALIGN (RPC_POLICY, EndpointFlags, 4)
1026 TEST_FIELD_OFFSET(RPC_POLICY, EndpointFlags, 4)
1027 TEST_FIELD_SIZE (RPC_POLICY, NICFlags, 4)
1028 TEST_FIELD_ALIGN (RPC_POLICY, NICFlags, 4)
1029 TEST_FIELD_OFFSET(RPC_POLICY, NICFlags, 8)
1030}
1031
1032static void test_pack_UUID_VECTOR(void)
1033{
1034 /* UUID_VECTOR */
1040 TEST_FIELD_SIZE (UUID_VECTOR, Uuid, 4)
1041 TEST_FIELD_ALIGN (UUID_VECTOR, Uuid, 4)
1043}
1044
1046{
1047 /* PRPC_CLIENT_INTERFACE */
1052}
1053
1055{
1056 /* PRPC_DISPATCH_TABLE */
1061}
1062
1063static void test_pack_PRPC_MESSAGE(void)
1064{
1065 /* PRPC_MESSAGE */
1070}
1071
1073{
1074 /* PRPC_PROTSEQ_ENDPOINT */
1079}
1080
1082{
1083 /* PRPC_SERVER_INTERFACE */
1088}
1089
1091{
1092 /* PRPC_SYNTAX_IDENTIFIER */
1097}
1098
1100{
1101 /* RPC_CLIENT_INTERFACE */
1107 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterfaceId, 20)
1108 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterfaceId, 4)
1110 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, TransferSyntax, 20)
1111 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, TransferSyntax, 4)
1112 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, TransferSyntax, 24)
1116 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
1117 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
1118 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 48)
1119 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4)
1120 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4)
1121 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 52)
1125 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterpreterInfo, 4)
1126 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterpreterInfo, 4)
1127 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterpreterInfo, 60)
1131}
1132
1134{
1135 /* RPC_DISPATCH_FUNCTION */
1136}
1137
1139{
1140 /* RPC_DISPATCH_TABLE */
1143 TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
1144 TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
1145 TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTableCount, 0)
1152}
1153
1154static void test_pack_RPC_MESSAGE(void)
1155{
1156 /* RPC_MESSAGE */
1162 TEST_FIELD_SIZE (RPC_MESSAGE, DataRepresentation, 4)
1163 TEST_FIELD_ALIGN (RPC_MESSAGE, DataRepresentation, 4)
1164 TEST_FIELD_OFFSET(RPC_MESSAGE, DataRepresentation, 4)
1171 TEST_FIELD_SIZE (RPC_MESSAGE, ProcNum, 4)
1172 TEST_FIELD_ALIGN (RPC_MESSAGE, ProcNum, 4)
1173 TEST_FIELD_OFFSET(RPC_MESSAGE, ProcNum, 16)
1174 TEST_FIELD_SIZE (RPC_MESSAGE, TransferSyntax, 4)
1175 TEST_FIELD_ALIGN (RPC_MESSAGE, TransferSyntax, 4)
1176 TEST_FIELD_OFFSET(RPC_MESSAGE, TransferSyntax, 20)
1177 TEST_FIELD_SIZE (RPC_MESSAGE, RpcInterfaceInformation, 4)
1178 TEST_FIELD_ALIGN (RPC_MESSAGE, RpcInterfaceInformation, 4)
1179 TEST_FIELD_OFFSET(RPC_MESSAGE, RpcInterfaceInformation, 24)
1180 TEST_FIELD_SIZE (RPC_MESSAGE, ReservedForRuntime, 4)
1181 TEST_FIELD_ALIGN (RPC_MESSAGE, ReservedForRuntime, 4)
1182 TEST_FIELD_OFFSET(RPC_MESSAGE, ReservedForRuntime, 28)
1183 TEST_FIELD_SIZE (RPC_MESSAGE, ManagerEpv, 4)
1184 TEST_FIELD_ALIGN (RPC_MESSAGE, ManagerEpv, 4)
1185 TEST_FIELD_OFFSET(RPC_MESSAGE, ManagerEpv, 32)
1186 TEST_FIELD_SIZE (RPC_MESSAGE, ImportContext, 4)
1187 TEST_FIELD_ALIGN (RPC_MESSAGE, ImportContext, 4)
1188 TEST_FIELD_OFFSET(RPC_MESSAGE, ImportContext, 36)
1189 TEST_FIELD_SIZE (RPC_MESSAGE, RpcFlags, 4)
1190 TEST_FIELD_ALIGN (RPC_MESSAGE, RpcFlags, 4)
1191 TEST_FIELD_OFFSET(RPC_MESSAGE, RpcFlags, 40)
1192}
1193
1195{
1196 /* RPC_PROTSEQ_ENDPOINT */
1199 TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4)
1200 TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4)
1201 TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 0)
1205}
1206
1208{
1209 /* RPC_SERVER_INTERFACE */
1215 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterfaceId, 20)
1216 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterfaceId, 4)
1218 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, TransferSyntax, 20)
1219 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, TransferSyntax, 4)
1220 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, TransferSyntax, 24)
1224 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
1225 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
1226 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 48)
1227 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4)
1228 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4)
1229 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 52)
1230 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4)
1231 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4)
1232 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DefaultManagerEpv, 56)
1233 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterpreterInfo, 4)
1234 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterpreterInfo, 4)
1235 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterpreterInfo, 60)
1239}
1240
1242{
1243 /* RPC_SYNTAX_IDENTIFIER */
1246 TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 16)
1249 TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 4)
1250 TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 2)
1251 TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 16)
1252}
1253
1254static void test_pack_RPC_VERSION(void)
1255{
1256 /* RPC_VERSION */
1265}
1266
1267static void test_pack_ARRAY_INFO(void)
1268{
1269 /* ARRAY_INFO */
1272 TEST_FIELD_SIZE (ARRAY_INFO, Dimension, 4)
1273 TEST_FIELD_ALIGN (ARRAY_INFO, Dimension, 4)
1274 TEST_FIELD_OFFSET(ARRAY_INFO, Dimension, 0)
1275 TEST_FIELD_SIZE (ARRAY_INFO, BufferConformanceMark, 4)
1276 TEST_FIELD_ALIGN (ARRAY_INFO, BufferConformanceMark, 4)
1277 TEST_FIELD_OFFSET(ARRAY_INFO, BufferConformanceMark, 4)
1278 TEST_FIELD_SIZE (ARRAY_INFO, BufferVarianceMark, 4)
1279 TEST_FIELD_ALIGN (ARRAY_INFO, BufferVarianceMark, 4)
1280 TEST_FIELD_OFFSET(ARRAY_INFO, BufferVarianceMark, 8)
1281 TEST_FIELD_SIZE (ARRAY_INFO, MaxCountArray, 4)
1282 TEST_FIELD_ALIGN (ARRAY_INFO, MaxCountArray, 4)
1283 TEST_FIELD_OFFSET(ARRAY_INFO, MaxCountArray, 12)
1284 TEST_FIELD_SIZE (ARRAY_INFO, OffsetArray, 4)
1285 TEST_FIELD_ALIGN (ARRAY_INFO, OffsetArray, 4)
1286 TEST_FIELD_OFFSET(ARRAY_INFO, OffsetArray, 16)
1287 TEST_FIELD_SIZE (ARRAY_INFO, ActualCountArray, 4)
1288 TEST_FIELD_ALIGN (ARRAY_INFO, ActualCountArray, 4)
1289 TEST_FIELD_OFFSET(ARRAY_INFO, ActualCountArray, 20)
1290}
1291
1293{
1294 /* COMM_FAULT_OFFSETS */
1297 TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, CommOffset, 2)
1298 TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, CommOffset, 2)
1300 TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, FaultOffset, 2)
1301 TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, FaultOffset, 2)
1302 TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, FaultOffset, 2)
1303}
1304
1305static void test_pack_CS_STUB_INFO(void)
1306{
1307 /* CS_STUB_INFO */
1310 TEST_FIELD_SIZE (CS_STUB_INFO, WireCodeset, 4)
1311 TEST_FIELD_ALIGN (CS_STUB_INFO, WireCodeset, 4)
1312 TEST_FIELD_OFFSET(CS_STUB_INFO, WireCodeset, 0)
1313 TEST_FIELD_SIZE (CS_STUB_INFO, DesiredReceivingCodeset, 4)
1314 TEST_FIELD_ALIGN (CS_STUB_INFO, DesiredReceivingCodeset, 4)
1315 TEST_FIELD_OFFSET(CS_STUB_INFO, DesiredReceivingCodeset, 4)
1316 TEST_FIELD_SIZE (CS_STUB_INFO, CSArrayInfo, 4)
1317 TEST_FIELD_ALIGN (CS_STUB_INFO, CSArrayInfo, 4)
1318 TEST_FIELD_OFFSET(CS_STUB_INFO, CSArrayInfo, 8)
1319}
1320
1321static void test_pack_EXPR_EVAL(void)
1322{
1323 /* EXPR_EVAL */
1324}
1325
1327{
1328 /* FULL_PTR_TO_REFID_ELEMENT */
1343}
1344
1346{
1347 /* FULL_PTR_XLAT_TABLES */
1348}
1349
1351{
1352 /* GENERIC_BINDING_INFO */
1359}
1360
1362{
1363 /* GENERIC_BINDING_ROUTINE_PAIR */
1364}
1365
1367{
1368 /* MALLOC_FREE_STRUCT */
1369}
1370
1372{
1373 /* MIDL_FORMAT_STRING */
1377}
1378
1380{
1381 /* MIDL_SERVER_INFO */
1384 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pStubDesc, 4)
1385 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pStubDesc, 4)
1386 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pStubDesc, 0)
1390 TEST_FIELD_SIZE (MIDL_SERVER_INFO, ProcString, 4)
1391 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ProcString, 4)
1392 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ProcString, 8)
1393 TEST_FIELD_SIZE (MIDL_SERVER_INFO, FmtStringOffset, 4)
1394 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, FmtStringOffset, 4)
1395 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, FmtStringOffset, 12)
1396 TEST_FIELD_SIZE (MIDL_SERVER_INFO, ThunkTable, 4)
1397 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ThunkTable, 4)
1398 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ThunkTable, 16)
1399 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pTransferSyntax, 4)
1400 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pTransferSyntax, 4)
1401 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pTransferSyntax, 20)
1405 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pSyntaxInfo, 4)
1406 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pSyntaxInfo, 4)
1407 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pSyntaxInfo, 28)
1408}
1409
1411{
1412 /* MIDL_STUB_DESC */
1413 TEST_FIELD_SIZE (MIDL_STUB_DESC, RpcInterfaceInformation, 4)
1414 TEST_FIELD_ALIGN (MIDL_STUB_DESC, RpcInterfaceInformation, 4)
1415 TEST_FIELD_OFFSET(MIDL_STUB_DESC, RpcInterfaceInformation, 0)
1416}
1417
1419{
1420 /* MIDL_STUB_MESSAGE */
1427 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferStart, 4)
1428 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferStart, 4)
1429 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferStart, 8)
1433 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferMark, 4)
1434 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferMark, 4)
1435 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferMark, 16)
1445 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
1446 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
1447 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ReuseBuffer, 36)
1448 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4)
1449 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4)
1450 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pAllocAllNodesContext, 40)
1451 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pPointerQueueState, 4)
1452 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pPointerQueueState, 4)
1453 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pPointerQueueState, 44)
1454 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
1455 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
1456 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 48)
1457 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, PointerBufferMark, 4)
1458 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, PointerBufferMark, 4)
1459 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, PointerBufferMark, 52)
1460 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
1461 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
1462 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, CorrDespIncrement, 56)
1466 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MaxCount, 4)
1467 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MaxCount, 4)
1472 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ActualCount, 4)
1473 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ActualCount, 4)
1474 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ActualCount, 68)
1475}
1476
1478{
1479 /* MIDL_STUBLESS_PROXY_INFO */
1485 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4)
1486 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4)
1487 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4)
1488 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4)
1489 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4)
1490 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8)
1491 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4)
1492 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4)
1493 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 12)
1500}
1501
1503{
1504 /* MIDL_SYNTAX_INFO */
1507 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TransferSyntax, 20)
1508 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TransferSyntax, 4)
1509 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TransferSyntax, 0)
1513 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, ProcString, 4)
1514 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, ProcString, 4)
1515 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, ProcString, 24)
1516 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, FmtStringOffset, 4)
1517 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, FmtStringOffset, 4)
1518 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, FmtStringOffset, 28)
1519 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TypeString, 4)
1520 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TypeString, 4)
1521 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TypeString, 32)
1522 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4)
1523 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4)
1524 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 36)
1525 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved1, 4)
1526 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved1, 4)
1527 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved1, 40)
1528 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved2, 4)
1529 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved2, 4)
1530 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved2, 44)
1531}
1532
1533static void test_pack_NDR_CCONTEXT(void)
1534{
1535 /* NDR_CCONTEXT */
1538}
1539
1541{
1542 /* NDR_NOTIFY_ROUTINE */
1543}
1544
1546{
1547 /* NDR_NOTIFY2_ROUTINE */
1548}
1549
1550static void test_pack_NDR_RUNDOWN(void)
1551{
1552 /* NDR_RUNDOWN */
1553}
1554
1555static void test_pack_NDR_SCONTEXT(void)
1556{
1557 /* NDR_SCONTEXT */
1560}
1561
1563{
1564 /* NDR_USER_MARSHAL_INFO */
1565 TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
1566 TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
1567 TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO, InformationLevel, 0)
1568}
1569
1571{
1572 /* NDR_USER_MARSHAL_INFO_LEVEL1 */
1579}
1580
1581static void test_pack_PARRAY_INFO(void)
1582{
1583 /* PARRAY_INFO */
1588}
1589
1591{
1592 /* PFORMAT_STRING */
1595}
1596
1598{
1599 /* PFULL_PTR_TO_REFID_ELEMENT */
1604}
1605
1607{
1608 /* PFULL_PTR_XLAT_TABLES */
1611}
1612
1614{
1615 /* PGENERIC_BINDING_INFO */
1618}
1619
1621{
1622 /* PGENERIC_BINDING_ROUTINE_PAIR */
1625}
1626
1628{
1629 /* PMIDL_SERVER_INFO */
1634}
1635
1637{
1638 /* PMIDL_STUB_DESC */
1641}
1642
1644{
1645 /* PMIDL_STUB_MESSAGE */
1648}
1649
1651{
1652 /* PMIDL_STUBLESS_PROXY_INFO */
1657}
1658
1660{
1661 /* PMIDL_SYNTAX_INFO */
1666}
1667
1669{
1670 /* PNDR_ASYNC_MESSAGE */
1673}
1674
1676{
1677 /* PNDR_CORRELATION_INFO */
1680}
1681
1683{
1684 /* PSCONTEXT_QUEUE */
1689}
1690
1692{
1693 /* PXMIT_ROUTINE_QUINTUPLE */
1696}
1697
1699{
1700 /* SCONTEXT_QUEUE */
1703 TEST_FIELD_SIZE (SCONTEXT_QUEUE, NumberOfObjects, 4)
1704 TEST_FIELD_ALIGN (SCONTEXT_QUEUE, NumberOfObjects, 4)
1705 TEST_FIELD_OFFSET(SCONTEXT_QUEUE, NumberOfObjects, 0)
1706 TEST_FIELD_SIZE (SCONTEXT_QUEUE, ArrayOfObjects, 4)
1707 TEST_FIELD_ALIGN (SCONTEXT_QUEUE, ArrayOfObjects, 4)
1708 TEST_FIELD_OFFSET(SCONTEXT_QUEUE, ArrayOfObjects, 4)
1709}
1710
1712{
1713 /* SERVER_ROUTINE */
1714}
1715
1716static void test_pack_STUB_THUNK(void)
1717{
1718 /* STUB_THUNK */
1719}
1720
1722{
1723 /* USER_MARSHAL_CB */
1727 TEST_FIELD_SIZE (USER_MARSHAL_CB, pStubMsg, 4)
1728 TEST_FIELD_ALIGN (USER_MARSHAL_CB, pStubMsg, 4)
1730 TEST_FIELD_SIZE (USER_MARSHAL_CB, pReserve, 4)
1731 TEST_FIELD_ALIGN (USER_MARSHAL_CB, pReserve, 4)
1736}
1737
1739{
1740 /* USER_MARSHAL_FREEING_ROUTINE */
1741}
1742
1744{
1745 /* USER_MARSHAL_MARSHALLING_ROUTINE */
1746}
1747
1749{
1750 /* USER_MARSHAL_ROUTINE_QUADRUPLE */
1751}
1752
1754{
1755 /* USER_MARSHAL_SIZING_ROUTINE */
1756}
1757
1759{
1760 /* USER_MARSHAL_UNMARSHALLING_ROUTINE */
1761}
1762
1764{
1765 /* XMIT_HELPER_ROUTINE */
1766}
1767
1769{
1770 /* XMIT_ROUTINE_QUINTUPLE */
1771}
1772
1774{
1775 /* PRPC_STUB_FUNCTION */
1776}
1777
1778#endif /* _WIN64 */
1779
1780static void test_pack(void)
1781{
1857}
1858
1859START_TEST(generated)
1860{
1861 test_pack();
1862}
#define START_TEST(x)
Definition: atltest.h:75
char * Pad(char *Str, char PadChar, ULONG Length)
Definition: cabman.cxx:29
Definition: bufpool.h:45
UINT uFlags
Definition: api.c:59
static const WCHAR Signature[]
Definition: parser.c:141
ULONG MajorVersion
Definition: ros_glue.cpp:4
ULONG MinorVersion
Definition: ros_glue.cpp:5
ULONG Handle
Definition: gdb_input.c:15
#define TEST_TARGET_SIZE(type, size)
Definition: generated.c:68
#define TEST_FIELD_OFFSET(type, field, offset)
Definition: generated.c:66
#define TEST_TARGET_ALIGN(type, align)
Definition: generated.c:62
static void test_pack(void)
Definition: generated.c:13122
#define TEST_TYPE_SIZE(type, size)
Definition: generated.c:50
#define TEST_FIELD_SIZE(type, field, size)
Definition: generated.c:69
#define TEST_TYPE_ALIGN(type, align)
Definition: generated.c:55
#define TEST_FIELD_ALIGN(type, field, align)
Definition: generated.c:63
int Count
Definition: noreturn.cpp:7
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
struct _NDR_CORRELATION_INFO * PNDR_CORRELATION_INFO
Definition: rpcndr.h:198
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:176
struct _NDR_ASYNC_MESSAGE * PNDR_ASYNC_MESSAGE
Definition: rpcndr.h:197
static void test_pack_XMIT_ROUTINE_QUINTUPLE(void)
Definition: generated.c:1768
static void test_pack_MIDL_SYNTAX_INFO(void)
Definition: generated.c:1502
static void test_pack_NDR_RUNDOWN(void)
Definition: generated.c:1550
static void test_pack_UUID_VECTOR(void)
Definition: generated.c:1032
static void test_pack_MIDL_SERVER_INFO(void)
Definition: generated.c:1379
static void test_pack_ARRAY_INFO(void)
Definition: generated.c:1267
static void test_pack_RPC_SERVER_INTERFACE(void)
Definition: generated.c:1207
static void test_pack_FULL_PTR_TO_REFID_ELEMENT(void)
Definition: generated.c:1326
static void test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE(void)
Definition: generated.c:1748
static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void)
Definition: generated.c:1691
static void test_pack_COMM_FAULT_OFFSETS(void)
Definition: generated.c:1292
static void test_pack_MIDL_STUB_MESSAGE(void)
Definition: generated.c:1418
static void test_pack_PARRAY_INFO(void)
Definition: generated.c:1581
static void test_pack_PRPC_DISPATCH_TABLE(void)
Definition: generated.c:1054
static void test_pack_RPC_AUTHZ_HANDLE(void)
Definition: generated.c:966
static void test_pack_USER_MARSHAL_CB(void)
Definition: generated.c:1721
static void test_pack_RPC_DISPATCH_FUNCTION(void)
Definition: generated.c:1133
static void test_pack_EXPR_EVAL(void)
Definition: generated.c:1321
static void test_pack_PFULL_PTR_TO_REFID_ELEMENT(void)
Definition: generated.c:1597
static void test_pack_PNDR_CORRELATION_INFO(void)
Definition: generated.c:1675
static void test_pack_I_RPC_HANDLE(void)
Definition: generated.c:931
static void test_pack_SERVER_ROUTINE(void)
Definition: generated.c:1711
static void test_pack_RPC_DISPATCH_TABLE(void)
Definition: generated.c:1138
static void test_pack_PNDR_ASYNC_MESSAGE(void)
Definition: generated.c:1668
static void test_pack_XMIT_HELPER_ROUTINE(void)
Definition: generated.c:1763
static void test_pack_RPC_SYNTAX_IDENTIFIER(void)
Definition: generated.c:1241
static void test_pack_RPC_CLIENT_INTERFACE(void)
Definition: generated.c:1099
static void test_pack_NDR_CCONTEXT(void)
Definition: generated.c:1533
static void test_pack_RPC_BINDING_HANDLE(void)
Definition: generated.c:973
static void test_pack_RPC_IF_HANDLE(void)
Definition: generated.c:993
static void test_pack_NDR_SCONTEXT(void)
Definition: generated.c:1555
static void test_pack_PSCONTEXT_QUEUE(void)
Definition: generated.c:1682
static void test_pack_PMIDL_STUBLESS_PROXY_INFO(void)
Definition: generated.c:1650
static void test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(void)
Definition: generated.c:1570
static void test_pack_RPC_BINDING_VECTOR(void)
Definition: generated.c:980
static void test_pack_PRPC_MESSAGE(void)
Definition: generated.c:1063
static void test_pack_CS_STUB_INFO(void)
Definition: generated.c:1305
static void test_pack_FULL_PTR_XLAT_TABLES(void)
Definition: generated.c:1345
static void test_pack_NDR_USER_MARSHAL_INFO(void)
Definition: generated.c:1562
static void test_pack_USER_MARSHAL_MARSHALLING_ROUTINE(void)
Definition: generated.c:1743
static void test_pack_GENERIC_BINDING_ROUTINE_PAIR(void)
Definition: generated.c:1361
static void test_pack_MIDL_STUBLESS_PROXY_INFO(void)
Definition: generated.c:1477
static void test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE(void)
Definition: generated.c:1758
static void test_pack_RPC_PROTSEQ_ENDPOINT(void)
Definition: generated.c:1194
static void test_pack_PGENERIC_BINDING_INFO(void)
Definition: generated.c:1613
static void test_pack_PRPC_PROTSEQ_ENDPOINT(void)
Definition: generated.c:1072
static void test_pack_PRPC_STUB_FUNCTION(void)
Definition: generated.c:1773
static void test_pack_PGENERIC_BINDING_ROUTINE_PAIR(void)
Definition: generated.c:1620
static void test_pack_USER_MARSHAL_SIZING_ROUTINE(void)
Definition: generated.c:1753
static void test_pack_RPC_VERSION(void)
Definition: generated.c:1254
static void test_pack_STUB_THUNK(void)
Definition: generated.c:1716
static void test_pack_PMIDL_STUB_MESSAGE(void)
Definition: generated.c:1643
static void test_pack_PFORMAT_STRING(void)
Definition: generated.c:1590
static void test_pack_RPC_POLICY(void)
Definition: generated.c:1016
static void test_pack_PRPC_POLICY(void)
Definition: generated.c:945
static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void)
Definition: generated.c:1738
static void test_pack_PMIDL_STUB_DESC(void)
Definition: generated.c:1636
static void test_pack_PRPC_CLIENT_INTERFACE(void)
Definition: generated.c:1045
static void test_pack_RPC_AUTH_IDENTITY_HANDLE(void)
Definition: generated.c:954
static void test_pack_PMIDL_SYNTAX_INFO(void)
Definition: generated.c:1659
static void test_pack_GENERIC_BINDING_INFO(void)
Definition: generated.c:1350
static void test_pack_RPC_IF_ID(void)
Definition: generated.c:1000
static void test_pack_SCONTEXT_QUEUE(void)
Definition: generated.c:1698
static void test_pack_PRPC_SERVER_INTERFACE(void)
Definition: generated.c:1081
static void test_pack_MALLOC_FREE_STRUCT(void)
Definition: generated.c:1366
static void test_pack_PMIDL_SERVER_INFO(void)
Definition: generated.c:1627
static void test_pack_RPC_MESSAGE(void)
Definition: generated.c:1154
static void test_pack_NDR_NOTIFY2_ROUTINE(void)
Definition: generated.c:1545
static void test_pack_NDR_NOTIFY_ROUTINE(void)
Definition: generated.c:1540
static void test_pack_PRPC_SYNTAX_IDENTIFIER(void)
Definition: generated.c:1090
static void test_pack_PFULL_PTR_XLAT_TABLES(void)
Definition: generated.c:1606
static void test_pack_MIDL_STUB_DESC(void)
Definition: generated.c:1410
static void test_pack_RPC_STATUS(void)
Definition: generated.c:938
static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void)
Definition: generated.c:961
static void test_pack_MIDL_FORMAT_STRING(void)
Definition: generated.c:1371
long RPC_STATUS
Definition: rpc.h:52
static CONST DWORD MemorySize[]
Definition: svga.c:32
_In_ PUCHAR BufferEnd
Definition: usbdlib.h:189
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
Definition: wdfmemory.h:169
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_In_ PWDFDEVICE_INIT _In_ PWDF_PDO_EVENT_CALLBACKS DispatchTable
Definition: wdfpdo.h:248
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170