quartz: Free two assert calls from having side effects.
[wine/testsucceed.git] / dlls / rpcrt4 / tests / generated.c
blob4b9d16cba07d879d8d62da1acd682979d07b5d2e
1 /* File generated automatically from tools/winapi/tests.dat; do not edit! */
2 /* This file can be copied, modified and distributed without restriction. */
4 /*
5 * Unit tests for data structure packing
6 */
8 #define WINVER 0x0501
9 #define _WIN32_IE 0x0501
10 #define _WIN32_WINNT 0x0501
12 #define WINE_NOWINSOCK
14 #include <stdarg.h>
15 #include "windef.h"
16 #include "winbase.h"
17 #include "rpc.h"
18 #include "rpcndr.h"
19 #include "rpcproxy.h"
21 #include "wine/test.h"
23 /***********************************************************************
24 * Compatibility macros
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 _TYPE_ALIGNMENT(type) __alignof(type)
37 #elif defined(__GNUC__)
38 # define _TYPE_ALIGNMENT(type) __alignof__(type)
39 #else
41 * FIXME: May not be possible without a compiler extension
42 * (if type is not just a name that is, otherwise the normal
43 * TYPE_ALIGNMENT can be used)
45 #endif
47 #if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
48 #pragma warning(disable:4116)
49 #endif
51 #if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
52 # define TYPE_ALIGNMENT _TYPE_ALIGNMENT
53 #endif
55 /***********************************************************************
56 * Test helper macros
59 #define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size);
61 #ifdef TYPE_ALIGNMENT
62 # define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
63 #else
64 # define TEST_TYPE_ALIGN(type, align)
65 #endif
67 #ifdef _TYPE_ALIGNMENT
68 # define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
69 # define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
70 #else
71 # define TEST_TARGET_ALIGN(type, align)
72 # define TEST_FIELD_ALIGN(type, field, align)
73 #endif
75 #define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
77 #define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size)
78 #define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size)
79 #define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0);
80 #define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0);
83 #ifdef _WIN64
85 static void test_pack_I_RPC_HANDLE(void)
87 /* I_RPC_HANDLE */
88 TEST_TYPE_SIZE (I_RPC_HANDLE, 8)
89 TEST_TYPE_ALIGN (I_RPC_HANDLE, 8)
92 static void test_pack_RPC_STATUS(void)
94 /* RPC_STATUS */
95 TEST_TYPE_SIZE (RPC_STATUS, 4)
96 TEST_TYPE_ALIGN (RPC_STATUS, 4)
99 static void test_pack_PRPC_POLICY(void)
101 /* PRPC_POLICY */
102 TEST_TYPE_SIZE (PRPC_POLICY, 8)
103 TEST_TYPE_ALIGN (PRPC_POLICY, 8)
104 TEST_TARGET_SIZE (PRPC_POLICY, 12)
105 TEST_TARGET_ALIGN(PRPC_POLICY, 4)
108 static void test_pack_RPC_AUTH_IDENTITY_HANDLE(void)
110 /* RPC_AUTH_IDENTITY_HANDLE */
111 TEST_TYPE_SIZE (RPC_AUTH_IDENTITY_HANDLE, 8)
112 TEST_TYPE_ALIGN (RPC_AUTH_IDENTITY_HANDLE, 8)
115 static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void)
117 /* RPC_AUTH_KEY_RETRIEVAL_FN */
120 static void test_pack_RPC_AUTHZ_HANDLE(void)
122 /* RPC_AUTHZ_HANDLE */
123 TEST_TYPE_SIZE (RPC_AUTHZ_HANDLE, 8)
124 TEST_TYPE_ALIGN (RPC_AUTHZ_HANDLE, 8)
127 static void test_pack_RPC_BINDING_HANDLE(void)
129 /* RPC_BINDING_HANDLE */
130 TEST_TYPE_SIZE (RPC_BINDING_HANDLE, 8)
131 TEST_TYPE_ALIGN (RPC_BINDING_HANDLE, 8)
134 static void test_pack_RPC_BINDING_VECTOR(void)
136 /* RPC_BINDING_VECTOR */
137 TEST_TYPE_SIZE (RPC_BINDING_VECTOR, 16)
138 TEST_TYPE_ALIGN (RPC_BINDING_VECTOR, 8)
139 TEST_FIELD_SIZE (RPC_BINDING_VECTOR, Count, 4)
140 TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, Count, 4)
141 TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, Count, 0)
142 TEST_FIELD_SIZE (RPC_BINDING_VECTOR, BindingH, 8)
143 TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, BindingH, 8)
144 TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, BindingH, 8)
147 static void test_pack_RPC_IF_HANDLE(void)
149 /* RPC_IF_HANDLE */
150 TEST_TYPE_SIZE (RPC_IF_HANDLE, 8)
151 TEST_TYPE_ALIGN (RPC_IF_HANDLE, 8)
154 static void test_pack_RPC_IF_ID(void)
156 /* RPC_IF_ID */
157 TEST_TYPE_SIZE (RPC_IF_ID, 20)
158 TEST_TYPE_ALIGN (RPC_IF_ID, 4)
159 TEST_FIELD_SIZE (RPC_IF_ID, Uuid, 16)
160 TEST_FIELD_ALIGN (RPC_IF_ID, Uuid, 4)
161 TEST_FIELD_OFFSET(RPC_IF_ID, Uuid, 0)
162 TEST_FIELD_SIZE (RPC_IF_ID, VersMajor, 2)
163 TEST_FIELD_ALIGN (RPC_IF_ID, VersMajor, 2)
164 TEST_FIELD_OFFSET(RPC_IF_ID, VersMajor, 16)
165 TEST_FIELD_SIZE (RPC_IF_ID, VersMinor, 2)
166 TEST_FIELD_ALIGN (RPC_IF_ID, VersMinor, 2)
167 TEST_FIELD_OFFSET(RPC_IF_ID, VersMinor, 18)
170 static void test_pack_RPC_POLICY(void)
172 /* RPC_POLICY */
173 TEST_TYPE_SIZE (RPC_POLICY, 12)
174 TEST_TYPE_ALIGN (RPC_POLICY, 4)
175 TEST_FIELD_SIZE (RPC_POLICY, Length, 4)
176 TEST_FIELD_ALIGN (RPC_POLICY, Length, 4)
177 TEST_FIELD_OFFSET(RPC_POLICY, Length, 0)
178 TEST_FIELD_SIZE (RPC_POLICY, EndpointFlags, 4)
179 TEST_FIELD_ALIGN (RPC_POLICY, EndpointFlags, 4)
180 TEST_FIELD_OFFSET(RPC_POLICY, EndpointFlags, 4)
181 TEST_FIELD_SIZE (RPC_POLICY, NICFlags, 4)
182 TEST_FIELD_ALIGN (RPC_POLICY, NICFlags, 4)
183 TEST_FIELD_OFFSET(RPC_POLICY, NICFlags, 8)
186 static void test_pack_UUID_VECTOR(void)
188 /* UUID_VECTOR */
189 TEST_TYPE_SIZE (UUID_VECTOR, 16)
190 TEST_TYPE_ALIGN (UUID_VECTOR, 8)
191 TEST_FIELD_SIZE (UUID_VECTOR, Count, 4)
192 TEST_FIELD_ALIGN (UUID_VECTOR, Count, 4)
193 TEST_FIELD_OFFSET(UUID_VECTOR, Count, 0)
194 TEST_FIELD_SIZE (UUID_VECTOR, Uuid, 8)
195 TEST_FIELD_ALIGN (UUID_VECTOR, Uuid, 8)
196 TEST_FIELD_OFFSET(UUID_VECTOR, Uuid, 8)
199 static void test_pack_PRPC_CLIENT_INTERFACE(void)
201 /* PRPC_CLIENT_INTERFACE */
202 TEST_TYPE_SIZE (PRPC_CLIENT_INTERFACE, 8)
203 TEST_TYPE_ALIGN (PRPC_CLIENT_INTERFACE, 8)
204 TEST_TARGET_SIZE (PRPC_CLIENT_INTERFACE, 96)
205 TEST_TARGET_ALIGN(PRPC_CLIENT_INTERFACE, 8)
208 static void test_pack_PRPC_DISPATCH_TABLE(void)
210 /* PRPC_DISPATCH_TABLE */
211 TEST_TYPE_SIZE (PRPC_DISPATCH_TABLE, 8)
212 TEST_TYPE_ALIGN (PRPC_DISPATCH_TABLE, 8)
213 TEST_TARGET_SIZE (PRPC_DISPATCH_TABLE, 24)
214 TEST_TARGET_ALIGN(PRPC_DISPATCH_TABLE, 8)
217 static void test_pack_PRPC_MESSAGE(void)
219 /* PRPC_MESSAGE */
220 TEST_TYPE_SIZE (PRPC_MESSAGE, 8)
221 TEST_TYPE_ALIGN (PRPC_MESSAGE, 8)
222 TEST_TARGET_SIZE (PRPC_MESSAGE, 80)
223 TEST_TARGET_ALIGN(PRPC_MESSAGE, 8)
226 static void test_pack_PRPC_PROTSEQ_ENDPOINT(void)
228 /* PRPC_PROTSEQ_ENDPOINT */
229 TEST_TYPE_SIZE (PRPC_PROTSEQ_ENDPOINT, 8)
230 TEST_TYPE_ALIGN (PRPC_PROTSEQ_ENDPOINT, 8)
231 TEST_TARGET_SIZE (PRPC_PROTSEQ_ENDPOINT, 16)
232 TEST_TARGET_ALIGN(PRPC_PROTSEQ_ENDPOINT, 8)
235 static void test_pack_PRPC_SERVER_INTERFACE(void)
237 /* PRPC_SERVER_INTERFACE */
238 TEST_TYPE_SIZE (PRPC_SERVER_INTERFACE, 8)
239 TEST_TYPE_ALIGN (PRPC_SERVER_INTERFACE, 8)
240 TEST_TARGET_SIZE (PRPC_SERVER_INTERFACE, 96)
241 TEST_TARGET_ALIGN(PRPC_SERVER_INTERFACE, 8)
244 static void test_pack_PRPC_SYNTAX_IDENTIFIER(void)
246 /* PRPC_SYNTAX_IDENTIFIER */
247 TEST_TYPE_SIZE (PRPC_SYNTAX_IDENTIFIER, 8)
248 TEST_TYPE_ALIGN (PRPC_SYNTAX_IDENTIFIER, 8)
249 TEST_TARGET_SIZE (PRPC_SYNTAX_IDENTIFIER, 20)
250 TEST_TARGET_ALIGN(PRPC_SYNTAX_IDENTIFIER, 4)
253 static void test_pack_RPC_CLIENT_INTERFACE(void)
255 /* RPC_CLIENT_INTERFACE */
256 TEST_TYPE_SIZE (RPC_CLIENT_INTERFACE, 96)
257 TEST_TYPE_ALIGN (RPC_CLIENT_INTERFACE, 8)
258 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Length, 4)
259 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Length, 4)
260 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Length, 0)
261 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterfaceId, 20)
262 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterfaceId, 4)
263 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterfaceId, 4)
264 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, TransferSyntax, 20)
265 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, TransferSyntax, 4)
266 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, TransferSyntax, 24)
267 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, DispatchTable, 8)
268 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, DispatchTable, 8)
269 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, DispatchTable, 48)
270 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
271 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
272 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 56)
273 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 8)
274 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 8)
275 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 64)
276 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Reserved, 8)
277 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Reserved, 8)
278 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Reserved, 72)
279 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterpreterInfo, 8)
280 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterpreterInfo, 8)
281 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterpreterInfo, 80)
282 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Flags, 4)
283 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Flags, 4)
284 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Flags, 88)
287 static void test_pack_RPC_DISPATCH_FUNCTION(void)
289 /* RPC_DISPATCH_FUNCTION */
292 static void test_pack_RPC_DISPATCH_TABLE(void)
294 /* RPC_DISPATCH_TABLE */
295 TEST_TYPE_SIZE (RPC_DISPATCH_TABLE, 24)
296 TEST_TYPE_ALIGN (RPC_DISPATCH_TABLE, 8)
297 TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
298 TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
299 TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTableCount, 0)
300 TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTable, 8)
301 TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTable, 8)
302 TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTable, 8)
303 TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, Reserved, 8)
304 TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, Reserved, 8)
305 TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, Reserved, 16)
308 static void test_pack_RPC_MESSAGE(void)
310 /* RPC_MESSAGE */
311 TEST_TYPE_SIZE (RPC_MESSAGE, 80)
312 TEST_TYPE_ALIGN (RPC_MESSAGE, 8)
313 TEST_FIELD_SIZE (RPC_MESSAGE, Handle, 8)
314 TEST_FIELD_ALIGN (RPC_MESSAGE, Handle, 8)
315 TEST_FIELD_OFFSET(RPC_MESSAGE, Handle, 0)
316 TEST_FIELD_SIZE (RPC_MESSAGE, DataRepresentation, 4)
317 TEST_FIELD_ALIGN (RPC_MESSAGE, DataRepresentation, 4)
318 TEST_FIELD_OFFSET(RPC_MESSAGE, DataRepresentation, 8)
319 TEST_FIELD_SIZE (RPC_MESSAGE, Buffer, 8)
320 TEST_FIELD_ALIGN (RPC_MESSAGE, Buffer, 8)
321 TEST_FIELD_OFFSET(RPC_MESSAGE, Buffer, 16)
322 TEST_FIELD_SIZE (RPC_MESSAGE, BufferLength, 4)
323 TEST_FIELD_ALIGN (RPC_MESSAGE, BufferLength, 4)
324 TEST_FIELD_OFFSET(RPC_MESSAGE, BufferLength, 24)
325 TEST_FIELD_SIZE (RPC_MESSAGE, ProcNum, 4)
326 TEST_FIELD_ALIGN (RPC_MESSAGE, ProcNum, 4)
327 TEST_FIELD_OFFSET(RPC_MESSAGE, ProcNum, 28)
328 TEST_FIELD_SIZE (RPC_MESSAGE, TransferSyntax, 8)
329 TEST_FIELD_ALIGN (RPC_MESSAGE, TransferSyntax, 8)
330 TEST_FIELD_OFFSET(RPC_MESSAGE, TransferSyntax, 32)
331 TEST_FIELD_SIZE (RPC_MESSAGE, RpcInterfaceInformation, 8)
332 TEST_FIELD_ALIGN (RPC_MESSAGE, RpcInterfaceInformation, 8)
333 TEST_FIELD_OFFSET(RPC_MESSAGE, RpcInterfaceInformation, 40)
334 TEST_FIELD_SIZE (RPC_MESSAGE, ReservedForRuntime, 8)
335 TEST_FIELD_ALIGN (RPC_MESSAGE, ReservedForRuntime, 8)
336 TEST_FIELD_OFFSET(RPC_MESSAGE, ReservedForRuntime, 48)
337 TEST_FIELD_SIZE (RPC_MESSAGE, ManagerEpv, 8)
338 TEST_FIELD_ALIGN (RPC_MESSAGE, ManagerEpv, 8)
339 TEST_FIELD_OFFSET(RPC_MESSAGE, ManagerEpv, 56)
340 TEST_FIELD_SIZE (RPC_MESSAGE, ImportContext, 8)
341 TEST_FIELD_ALIGN (RPC_MESSAGE, ImportContext, 8)
342 TEST_FIELD_OFFSET(RPC_MESSAGE, ImportContext, 64)
343 TEST_FIELD_SIZE (RPC_MESSAGE, RpcFlags, 4)
344 TEST_FIELD_ALIGN (RPC_MESSAGE, RpcFlags, 4)
345 TEST_FIELD_OFFSET(RPC_MESSAGE, RpcFlags, 72)
348 static void test_pack_RPC_PROTSEQ_ENDPOINT(void)
350 /* RPC_PROTSEQ_ENDPOINT */
351 TEST_TYPE_SIZE (RPC_PROTSEQ_ENDPOINT, 16)
352 TEST_TYPE_ALIGN (RPC_PROTSEQ_ENDPOINT, 8)
353 TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 8)
354 TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 8)
355 TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 0)
356 TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, Endpoint, 8)
357 TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, Endpoint, 8)
358 TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, Endpoint, 8)
361 static void test_pack_RPC_SERVER_INTERFACE(void)
363 /* RPC_SERVER_INTERFACE */
364 TEST_TYPE_SIZE (RPC_SERVER_INTERFACE, 96)
365 TEST_TYPE_ALIGN (RPC_SERVER_INTERFACE, 8)
366 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Length, 4)
367 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Length, 4)
368 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Length, 0)
369 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterfaceId, 20)
370 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterfaceId, 4)
371 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterfaceId, 4)
372 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, TransferSyntax, 20)
373 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, TransferSyntax, 4)
374 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, TransferSyntax, 24)
375 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DispatchTable, 8)
376 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DispatchTable, 8)
377 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DispatchTable, 48)
378 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
379 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
380 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 56)
381 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 8)
382 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 8)
383 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 64)
384 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DefaultManagerEpv, 8)
385 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DefaultManagerEpv, 8)
386 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DefaultManagerEpv, 72)
387 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterpreterInfo, 8)
388 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterpreterInfo, 8)
389 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterpreterInfo, 80)
390 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Flags, 4)
391 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Flags, 4)
392 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Flags, 88)
395 static void test_pack_RPC_SYNTAX_IDENTIFIER(void)
397 /* RPC_SYNTAX_IDENTIFIER */
398 TEST_TYPE_SIZE (RPC_SYNTAX_IDENTIFIER, 20)
399 TEST_TYPE_ALIGN (RPC_SYNTAX_IDENTIFIER, 4)
400 TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 16)
401 TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 4)
402 TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 0)
403 TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 4)
404 TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 2)
405 TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 16)
408 static void test_pack_RPC_VERSION(void)
410 /* RPC_VERSION */
411 TEST_TYPE_SIZE (RPC_VERSION, 4)
412 TEST_TYPE_ALIGN (RPC_VERSION, 2)
413 TEST_FIELD_SIZE (RPC_VERSION, MajorVersion, 2)
414 TEST_FIELD_ALIGN (RPC_VERSION, MajorVersion, 2)
415 TEST_FIELD_OFFSET(RPC_VERSION, MajorVersion, 0)
416 TEST_FIELD_SIZE (RPC_VERSION, MinorVersion, 2)
417 TEST_FIELD_ALIGN (RPC_VERSION, MinorVersion, 2)
418 TEST_FIELD_OFFSET(RPC_VERSION, MinorVersion, 2)
421 static void test_pack_ARRAY_INFO(void)
423 /* ARRAY_INFO */
424 TEST_TYPE_SIZE (ARRAY_INFO, 48)
425 TEST_TYPE_ALIGN (ARRAY_INFO, 8)
426 TEST_FIELD_SIZE (ARRAY_INFO, Dimension, 4)
427 TEST_FIELD_ALIGN (ARRAY_INFO, Dimension, 4)
428 TEST_FIELD_OFFSET(ARRAY_INFO, Dimension, 0)
429 TEST_FIELD_SIZE (ARRAY_INFO, BufferConformanceMark, 8)
430 TEST_FIELD_ALIGN (ARRAY_INFO, BufferConformanceMark, 8)
431 TEST_FIELD_OFFSET(ARRAY_INFO, BufferConformanceMark, 8)
432 TEST_FIELD_SIZE (ARRAY_INFO, BufferVarianceMark, 8)
433 TEST_FIELD_ALIGN (ARRAY_INFO, BufferVarianceMark, 8)
434 TEST_FIELD_OFFSET(ARRAY_INFO, BufferVarianceMark, 16)
435 TEST_FIELD_SIZE (ARRAY_INFO, MaxCountArray, 8)
436 TEST_FIELD_ALIGN (ARRAY_INFO, MaxCountArray, 8)
437 TEST_FIELD_OFFSET(ARRAY_INFO, MaxCountArray, 24)
438 TEST_FIELD_SIZE (ARRAY_INFO, OffsetArray, 8)
439 TEST_FIELD_ALIGN (ARRAY_INFO, OffsetArray, 8)
440 TEST_FIELD_OFFSET(ARRAY_INFO, OffsetArray, 32)
441 TEST_FIELD_SIZE (ARRAY_INFO, ActualCountArray, 8)
442 TEST_FIELD_ALIGN (ARRAY_INFO, ActualCountArray, 8)
443 TEST_FIELD_OFFSET(ARRAY_INFO, ActualCountArray, 40)
446 static void test_pack_COMM_FAULT_OFFSETS(void)
448 /* COMM_FAULT_OFFSETS */
449 TEST_TYPE_SIZE (COMM_FAULT_OFFSETS, 4)
450 TEST_TYPE_ALIGN (COMM_FAULT_OFFSETS, 2)
451 TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, CommOffset, 2)
452 TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, CommOffset, 2)
453 TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, CommOffset, 0)
454 TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, FaultOffset, 2)
455 TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, FaultOffset, 2)
456 TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, FaultOffset, 2)
459 static void test_pack_CS_STUB_INFO(void)
461 /* CS_STUB_INFO */
462 TEST_TYPE_SIZE (CS_STUB_INFO, 16)
463 TEST_TYPE_ALIGN (CS_STUB_INFO, 8)
464 TEST_FIELD_SIZE (CS_STUB_INFO, WireCodeset, 4)
465 TEST_FIELD_ALIGN (CS_STUB_INFO, WireCodeset, 4)
466 TEST_FIELD_OFFSET(CS_STUB_INFO, WireCodeset, 0)
467 TEST_FIELD_SIZE (CS_STUB_INFO, DesiredReceivingCodeset, 4)
468 TEST_FIELD_ALIGN (CS_STUB_INFO, DesiredReceivingCodeset, 4)
469 TEST_FIELD_OFFSET(CS_STUB_INFO, DesiredReceivingCodeset, 4)
470 TEST_FIELD_SIZE (CS_STUB_INFO, CSArrayInfo, 8)
471 TEST_FIELD_ALIGN (CS_STUB_INFO, CSArrayInfo, 8)
472 TEST_FIELD_OFFSET(CS_STUB_INFO, CSArrayInfo, 8)
475 static void test_pack_EXPR_EVAL(void)
477 /* EXPR_EVAL */
480 static void test_pack_FULL_PTR_TO_REFID_ELEMENT(void)
482 /* FULL_PTR_TO_REFID_ELEMENT */
483 TEST_TYPE_SIZE (FULL_PTR_TO_REFID_ELEMENT, 24)
484 TEST_TYPE_ALIGN (FULL_PTR_TO_REFID_ELEMENT, 8)
485 TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Next, 8)
486 TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Next, 8)
487 TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Next, 0)
488 TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Pointer, 8)
489 TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Pointer, 8)
490 TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Pointer, 8)
491 TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, RefId, 4)
492 TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, RefId, 4)
493 TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, RefId, 16)
494 TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, State, 1)
495 TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, State, 1)
496 TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, State, 20)
499 static void test_pack_FULL_PTR_XLAT_TABLES(void)
501 /* FULL_PTR_XLAT_TABLES */
504 static void test_pack_GENERIC_BINDING_INFO(void)
506 /* GENERIC_BINDING_INFO */
507 TEST_FIELD_SIZE (GENERIC_BINDING_INFO, pObj, 8)
508 TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, pObj, 8)
509 TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, pObj, 0)
510 TEST_FIELD_SIZE (GENERIC_BINDING_INFO, Size, 4)
511 TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, Size, 4)
512 TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, Size, 8)
515 static void test_pack_GENERIC_BINDING_ROUTINE_PAIR(void)
517 /* GENERIC_BINDING_ROUTINE_PAIR */
520 static void test_pack_MALLOC_FREE_STRUCT(void)
522 /* MALLOC_FREE_STRUCT */
525 static void test_pack_MIDL_FORMAT_STRING(void)
527 /* MIDL_FORMAT_STRING */
528 TEST_FIELD_SIZE (MIDL_FORMAT_STRING, Pad, 2)
529 TEST_FIELD_ALIGN (MIDL_FORMAT_STRING, Pad, 2)
530 TEST_FIELD_OFFSET(MIDL_FORMAT_STRING, Pad, 0)
533 static void test_pack_MIDL_SERVER_INFO(void)
535 /* MIDL_SERVER_INFO */
536 TEST_TYPE_SIZE (MIDL_SERVER_INFO, 64)
537 TEST_TYPE_ALIGN (MIDL_SERVER_INFO, 8)
538 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pStubDesc, 8)
539 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pStubDesc, 8)
540 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pStubDesc, 0)
541 TEST_FIELD_SIZE (MIDL_SERVER_INFO, DispatchTable, 8)
542 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, DispatchTable, 8)
543 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, DispatchTable, 8)
544 TEST_FIELD_SIZE (MIDL_SERVER_INFO, ProcString, 8)
545 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ProcString, 8)
546 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ProcString, 16)
547 TEST_FIELD_SIZE (MIDL_SERVER_INFO, FmtStringOffset, 8)
548 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, FmtStringOffset, 8)
549 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, FmtStringOffset, 24)
550 TEST_FIELD_SIZE (MIDL_SERVER_INFO, ThunkTable, 8)
551 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ThunkTable, 8)
552 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ThunkTable, 32)
553 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pTransferSyntax, 8)
554 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pTransferSyntax, 8)
555 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pTransferSyntax, 40)
556 TEST_FIELD_SIZE (MIDL_SERVER_INFO, nCount, 8)
557 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, nCount, 8)
558 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, nCount, 48)
559 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pSyntaxInfo, 8)
560 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pSyntaxInfo, 8)
561 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pSyntaxInfo, 56)
564 static void test_pack_MIDL_STUB_DESC(void)
566 /* MIDL_STUB_DESC */
567 TEST_FIELD_SIZE (MIDL_STUB_DESC, RpcInterfaceInformation, 8)
568 TEST_FIELD_ALIGN (MIDL_STUB_DESC, RpcInterfaceInformation, 8)
569 TEST_FIELD_OFFSET(MIDL_STUB_DESC, RpcInterfaceInformation, 0)
572 static void test_pack_MIDL_STUB_MESSAGE(void)
574 /* MIDL_STUB_MESSAGE */
575 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, RpcMsg, 8)
576 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, RpcMsg, 8)
577 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, RpcMsg, 0)
578 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Buffer, 8)
579 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Buffer, 8)
580 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Buffer, 8)
581 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferStart, 8)
582 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferStart, 8)
583 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferStart, 16)
584 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferEnd, 8)
585 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferEnd, 8)
586 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferEnd, 24)
587 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferMark, 8)
588 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferMark, 8)
589 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferMark, 32)
590 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferLength, 4)
591 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferLength, 4)
592 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferLength, 40)
593 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MemorySize, 4)
594 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MemorySize, 4)
595 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MemorySize, 44)
596 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Memory, 8)
597 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Memory, 8)
598 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Memory, 48)
599 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
600 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
601 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ReuseBuffer, 60)
602 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 8)
603 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 8)
604 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pAllocAllNodesContext, 64)
605 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pPointerQueueState, 8)
606 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pPointerQueueState, 8)
607 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pPointerQueueState, 72)
608 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
609 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
610 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 80)
611 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, PointerBufferMark, 8)
612 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, PointerBufferMark, 8)
613 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, PointerBufferMark, 88)
614 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
615 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
616 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, CorrDespIncrement, 96)
617 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, uFlags, 1)
618 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, uFlags, 1)
619 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, uFlags, 97)
620 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MaxCount, 8)
621 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MaxCount, 8)
622 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MaxCount, 104)
623 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Offset, 4)
624 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Offset, 4)
625 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Offset, 112)
626 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ActualCount, 4)
627 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ActualCount, 4)
628 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ActualCount, 116)
631 static void test_pack_MIDL_STUBLESS_PROXY_INFO(void)
633 /* MIDL_STUBLESS_PROXY_INFO */
634 TEST_TYPE_SIZE (MIDL_STUBLESS_PROXY_INFO, 48)
635 TEST_TYPE_ALIGN (MIDL_STUBLESS_PROXY_INFO, 8)
636 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 8)
637 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 8)
638 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pStubDesc, 0)
639 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 8)
640 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 8)
641 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 8)
642 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8)
643 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8)
644 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 16)
645 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 8)
646 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 8)
647 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 24)
648 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, nCount, 8)
649 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, nCount, 8)
650 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, nCount, 32)
651 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 8)
652 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 8)
653 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 40)
656 static void test_pack_MIDL_SYNTAX_INFO(void)
658 /* MIDL_SYNTAX_INFO */
659 TEST_TYPE_SIZE (MIDL_SYNTAX_INFO, 80)
660 TEST_TYPE_ALIGN (MIDL_SYNTAX_INFO, 8)
661 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TransferSyntax, 20)
662 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TransferSyntax, 4)
663 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TransferSyntax, 0)
664 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, DispatchTable, 8)
665 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, DispatchTable, 8)
666 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, DispatchTable, 24)
667 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, ProcString, 8)
668 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, ProcString, 8)
669 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, ProcString, 32)
670 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, FmtStringOffset, 8)
671 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, FmtStringOffset, 8)
672 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, FmtStringOffset, 40)
673 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TypeString, 8)
674 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TypeString, 8)
675 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TypeString, 48)
676 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 8)
677 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 8)
678 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 56)
679 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved1, 8)
680 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved1, 8)
681 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved1, 64)
682 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved2, 8)
683 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved2, 8)
684 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved2, 72)
687 static void test_pack_NDR_CCONTEXT(void)
689 /* NDR_CCONTEXT */
690 TEST_TYPE_SIZE (NDR_CCONTEXT, 8)
691 TEST_TYPE_ALIGN (NDR_CCONTEXT, 8)
694 static void test_pack_NDR_NOTIFY_ROUTINE(void)
696 /* NDR_NOTIFY_ROUTINE */
699 static void test_pack_NDR_NOTIFY2_ROUTINE(void)
701 /* NDR_NOTIFY2_ROUTINE */
704 static void test_pack_NDR_RUNDOWN(void)
706 /* NDR_RUNDOWN */
709 static void test_pack_NDR_SCONTEXT(void)
711 /* NDR_SCONTEXT */
712 TEST_TYPE_SIZE (NDR_SCONTEXT, 8)
713 TEST_TYPE_ALIGN (NDR_SCONTEXT, 8)
716 static void test_pack_NDR_USER_MARSHAL_INFO(void)
718 /* NDR_USER_MARSHAL_INFO */
719 TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
720 TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
721 TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO, InformationLevel, 0)
724 static void test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(void)
726 /* NDR_USER_MARSHAL_INFO_LEVEL1 */
727 TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 8)
728 TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 8)
729 TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 0)
730 TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4)
731 TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4)
732 TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 8)
735 static void test_pack_PARRAY_INFO(void)
737 /* PARRAY_INFO */
738 TEST_TYPE_SIZE (PARRAY_INFO, 8)
739 TEST_TYPE_ALIGN (PARRAY_INFO, 8)
740 TEST_TARGET_SIZE (PARRAY_INFO, 48)
741 TEST_TARGET_ALIGN(PARRAY_INFO, 8)
744 static void test_pack_PFORMAT_STRING(void)
746 /* PFORMAT_STRING */
747 TEST_TYPE_SIZE (PFORMAT_STRING, 8)
748 TEST_TYPE_ALIGN (PFORMAT_STRING, 8)
751 static void test_pack_PFULL_PTR_TO_REFID_ELEMENT(void)
753 /* PFULL_PTR_TO_REFID_ELEMENT */
754 TEST_TYPE_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 8)
755 TEST_TYPE_ALIGN (PFULL_PTR_TO_REFID_ELEMENT, 8)
756 TEST_TARGET_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 24)
757 TEST_TARGET_ALIGN(PFULL_PTR_TO_REFID_ELEMENT, 8)
760 static void test_pack_PFULL_PTR_XLAT_TABLES(void)
762 /* PFULL_PTR_XLAT_TABLES */
763 TEST_TYPE_SIZE (PFULL_PTR_XLAT_TABLES, 8)
764 TEST_TYPE_ALIGN (PFULL_PTR_XLAT_TABLES, 8)
767 static void test_pack_PGENERIC_BINDING_INFO(void)
769 /* PGENERIC_BINDING_INFO */
770 TEST_TYPE_SIZE (PGENERIC_BINDING_INFO, 8)
771 TEST_TYPE_ALIGN (PGENERIC_BINDING_INFO, 8)
774 static void test_pack_PGENERIC_BINDING_ROUTINE_PAIR(void)
776 /* PGENERIC_BINDING_ROUTINE_PAIR */
777 TEST_TYPE_SIZE (PGENERIC_BINDING_ROUTINE_PAIR, 8)
778 TEST_TYPE_ALIGN (PGENERIC_BINDING_ROUTINE_PAIR, 8)
781 static void test_pack_PMIDL_SERVER_INFO(void)
783 /* PMIDL_SERVER_INFO */
784 TEST_TYPE_SIZE (PMIDL_SERVER_INFO, 8)
785 TEST_TYPE_ALIGN (PMIDL_SERVER_INFO, 8)
786 TEST_TARGET_SIZE (PMIDL_SERVER_INFO, 64)
787 TEST_TARGET_ALIGN(PMIDL_SERVER_INFO, 8)
790 static void test_pack_PMIDL_STUB_DESC(void)
792 /* PMIDL_STUB_DESC */
793 TEST_TYPE_SIZE (PMIDL_STUB_DESC, 8)
794 TEST_TYPE_ALIGN (PMIDL_STUB_DESC, 8)
797 static void test_pack_PMIDL_STUB_MESSAGE(void)
799 /* PMIDL_STUB_MESSAGE */
800 TEST_TYPE_SIZE (PMIDL_STUB_MESSAGE, 8)
801 TEST_TYPE_ALIGN (PMIDL_STUB_MESSAGE, 8)
804 static void test_pack_PMIDL_STUBLESS_PROXY_INFO(void)
806 /* PMIDL_STUBLESS_PROXY_INFO */
807 TEST_TYPE_SIZE (PMIDL_STUBLESS_PROXY_INFO, 8)
808 TEST_TYPE_ALIGN (PMIDL_STUBLESS_PROXY_INFO, 8)
809 TEST_TARGET_SIZE (PMIDL_STUBLESS_PROXY_INFO, 48)
810 TEST_TARGET_ALIGN(PMIDL_STUBLESS_PROXY_INFO, 8)
813 static void test_pack_PMIDL_SYNTAX_INFO(void)
815 /* PMIDL_SYNTAX_INFO */
816 TEST_TYPE_SIZE (PMIDL_SYNTAX_INFO, 8)
817 TEST_TYPE_ALIGN (PMIDL_SYNTAX_INFO, 8)
818 TEST_TARGET_SIZE (PMIDL_SYNTAX_INFO, 80)
819 TEST_TARGET_ALIGN(PMIDL_SYNTAX_INFO, 8)
822 static void test_pack_PNDR_ASYNC_MESSAGE(void)
824 /* PNDR_ASYNC_MESSAGE */
825 TEST_TYPE_SIZE (PNDR_ASYNC_MESSAGE, 8)
826 TEST_TYPE_ALIGN (PNDR_ASYNC_MESSAGE, 8)
829 static void test_pack_PNDR_CORRELATION_INFO(void)
831 /* PNDR_CORRELATION_INFO */
832 TEST_TYPE_SIZE (PNDR_CORRELATION_INFO, 8)
833 TEST_TYPE_ALIGN (PNDR_CORRELATION_INFO, 8)
836 static void test_pack_PSCONTEXT_QUEUE(void)
838 /* PSCONTEXT_QUEUE */
839 TEST_TYPE_SIZE (PSCONTEXT_QUEUE, 8)
840 TEST_TYPE_ALIGN (PSCONTEXT_QUEUE, 8)
841 TEST_TARGET_SIZE (PSCONTEXT_QUEUE, 16)
842 TEST_TARGET_ALIGN(PSCONTEXT_QUEUE, 8)
845 static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void)
847 /* PXMIT_ROUTINE_QUINTUPLE */
848 TEST_TYPE_SIZE (PXMIT_ROUTINE_QUINTUPLE, 8)
849 TEST_TYPE_ALIGN (PXMIT_ROUTINE_QUINTUPLE, 8)
852 static void test_pack_SCONTEXT_QUEUE(void)
854 /* SCONTEXT_QUEUE */
855 TEST_TYPE_SIZE (SCONTEXT_QUEUE, 16)
856 TEST_TYPE_ALIGN (SCONTEXT_QUEUE, 8)
857 TEST_FIELD_SIZE (SCONTEXT_QUEUE, NumberOfObjects, 4)
858 TEST_FIELD_ALIGN (SCONTEXT_QUEUE, NumberOfObjects, 4)
859 TEST_FIELD_OFFSET(SCONTEXT_QUEUE, NumberOfObjects, 0)
860 TEST_FIELD_SIZE (SCONTEXT_QUEUE, ArrayOfObjects, 8)
861 TEST_FIELD_ALIGN (SCONTEXT_QUEUE, ArrayOfObjects, 8)
862 TEST_FIELD_OFFSET(SCONTEXT_QUEUE, ArrayOfObjects, 8)
865 static void test_pack_SERVER_ROUTINE(void)
867 /* SERVER_ROUTINE */
870 static void test_pack_STUB_THUNK(void)
872 /* STUB_THUNK */
875 static void test_pack_USER_MARSHAL_CB(void)
877 /* USER_MARSHAL_CB */
878 TEST_FIELD_SIZE (USER_MARSHAL_CB, Flags, 4)
879 TEST_FIELD_ALIGN (USER_MARSHAL_CB, Flags, 4)
880 TEST_FIELD_OFFSET(USER_MARSHAL_CB, Flags, 0)
881 TEST_FIELD_SIZE (USER_MARSHAL_CB, pStubMsg, 8)
882 TEST_FIELD_ALIGN (USER_MARSHAL_CB, pStubMsg, 8)
883 TEST_FIELD_OFFSET(USER_MARSHAL_CB, pStubMsg, 8)
884 TEST_FIELD_SIZE (USER_MARSHAL_CB, pReserve, 8)
885 TEST_FIELD_ALIGN (USER_MARSHAL_CB, pReserve, 8)
886 TEST_FIELD_OFFSET(USER_MARSHAL_CB, pReserve, 16)
887 TEST_FIELD_SIZE (USER_MARSHAL_CB, Signature, 4)
888 TEST_FIELD_ALIGN (USER_MARSHAL_CB, Signature, 4)
889 TEST_FIELD_OFFSET(USER_MARSHAL_CB, Signature, 24)
892 static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void)
894 /* USER_MARSHAL_FREEING_ROUTINE */
897 static void test_pack_USER_MARSHAL_MARSHALLING_ROUTINE(void)
899 /* USER_MARSHAL_MARSHALLING_ROUTINE */
902 static void test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE(void)
904 /* USER_MARSHAL_ROUTINE_QUADRUPLE */
907 static void test_pack_USER_MARSHAL_SIZING_ROUTINE(void)
909 /* USER_MARSHAL_SIZING_ROUTINE */
912 static void test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE(void)
914 /* USER_MARSHAL_UNMARSHALLING_ROUTINE */
917 static void test_pack_XMIT_HELPER_ROUTINE(void)
919 /* XMIT_HELPER_ROUTINE */
922 static void test_pack_XMIT_ROUTINE_QUINTUPLE(void)
924 /* XMIT_ROUTINE_QUINTUPLE */
927 static void test_pack_PRPC_STUB_FUNCTION(void)
929 /* PRPC_STUB_FUNCTION */
932 #else /* _WIN64 */
934 static void test_pack_I_RPC_HANDLE(void)
936 /* I_RPC_HANDLE */
937 TEST_TYPE_SIZE (I_RPC_HANDLE, 4)
938 TEST_TYPE_ALIGN (I_RPC_HANDLE, 4)
941 static void test_pack_RPC_STATUS(void)
943 /* RPC_STATUS */
944 TEST_TYPE_SIZE (RPC_STATUS, 4)
945 TEST_TYPE_ALIGN (RPC_STATUS, 4)
948 static void test_pack_PRPC_POLICY(void)
950 /* PRPC_POLICY */
951 TEST_TYPE_SIZE (PRPC_POLICY, 4)
952 TEST_TYPE_ALIGN (PRPC_POLICY, 4)
953 TEST_TARGET_SIZE (PRPC_POLICY, 12)
954 TEST_TARGET_ALIGN(PRPC_POLICY, 4)
957 static void test_pack_RPC_AUTH_IDENTITY_HANDLE(void)
959 /* RPC_AUTH_IDENTITY_HANDLE */
960 TEST_TYPE_SIZE (RPC_AUTH_IDENTITY_HANDLE, 4)
961 TEST_TYPE_ALIGN (RPC_AUTH_IDENTITY_HANDLE, 4)
964 static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void)
966 /* RPC_AUTH_KEY_RETRIEVAL_FN */
969 static void test_pack_RPC_AUTHZ_HANDLE(void)
971 /* RPC_AUTHZ_HANDLE */
972 TEST_TYPE_SIZE (RPC_AUTHZ_HANDLE, 4)
973 TEST_TYPE_ALIGN (RPC_AUTHZ_HANDLE, 4)
976 static void test_pack_RPC_BINDING_HANDLE(void)
978 /* RPC_BINDING_HANDLE */
979 TEST_TYPE_SIZE (RPC_BINDING_HANDLE, 4)
980 TEST_TYPE_ALIGN (RPC_BINDING_HANDLE, 4)
983 static void test_pack_RPC_BINDING_VECTOR(void)
985 /* RPC_BINDING_VECTOR */
986 TEST_TYPE_SIZE (RPC_BINDING_VECTOR, 8)
987 TEST_TYPE_ALIGN (RPC_BINDING_VECTOR, 4)
988 TEST_FIELD_SIZE (RPC_BINDING_VECTOR, Count, 4)
989 TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, Count, 4)
990 TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, Count, 0)
991 TEST_FIELD_SIZE (RPC_BINDING_VECTOR, BindingH, 4)
992 TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, BindingH, 4)
993 TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, BindingH, 4)
996 static void test_pack_RPC_IF_HANDLE(void)
998 /* RPC_IF_HANDLE */
999 TEST_TYPE_SIZE (RPC_IF_HANDLE, 4)
1000 TEST_TYPE_ALIGN (RPC_IF_HANDLE, 4)
1003 static void test_pack_RPC_IF_ID(void)
1005 /* RPC_IF_ID */
1006 TEST_TYPE_SIZE (RPC_IF_ID, 20)
1007 TEST_TYPE_ALIGN (RPC_IF_ID, 4)
1008 TEST_FIELD_SIZE (RPC_IF_ID, Uuid, 16)
1009 TEST_FIELD_ALIGN (RPC_IF_ID, Uuid, 4)
1010 TEST_FIELD_OFFSET(RPC_IF_ID, Uuid, 0)
1011 TEST_FIELD_SIZE (RPC_IF_ID, VersMajor, 2)
1012 TEST_FIELD_ALIGN (RPC_IF_ID, VersMajor, 2)
1013 TEST_FIELD_OFFSET(RPC_IF_ID, VersMajor, 16)
1014 TEST_FIELD_SIZE (RPC_IF_ID, VersMinor, 2)
1015 TEST_FIELD_ALIGN (RPC_IF_ID, VersMinor, 2)
1016 TEST_FIELD_OFFSET(RPC_IF_ID, VersMinor, 18)
1019 static void test_pack_RPC_POLICY(void)
1021 /* RPC_POLICY */
1022 TEST_TYPE_SIZE (RPC_POLICY, 12)
1023 TEST_TYPE_ALIGN (RPC_POLICY, 4)
1024 TEST_FIELD_SIZE (RPC_POLICY, Length, 4)
1025 TEST_FIELD_ALIGN (RPC_POLICY, Length, 4)
1026 TEST_FIELD_OFFSET(RPC_POLICY, Length, 0)
1027 TEST_FIELD_SIZE (RPC_POLICY, EndpointFlags, 4)
1028 TEST_FIELD_ALIGN (RPC_POLICY, EndpointFlags, 4)
1029 TEST_FIELD_OFFSET(RPC_POLICY, EndpointFlags, 4)
1030 TEST_FIELD_SIZE (RPC_POLICY, NICFlags, 4)
1031 TEST_FIELD_ALIGN (RPC_POLICY, NICFlags, 4)
1032 TEST_FIELD_OFFSET(RPC_POLICY, NICFlags, 8)
1035 static void test_pack_UUID_VECTOR(void)
1037 /* UUID_VECTOR */
1038 TEST_TYPE_SIZE (UUID_VECTOR, 8)
1039 TEST_TYPE_ALIGN (UUID_VECTOR, 4)
1040 TEST_FIELD_SIZE (UUID_VECTOR, Count, 4)
1041 TEST_FIELD_ALIGN (UUID_VECTOR, Count, 4)
1042 TEST_FIELD_OFFSET(UUID_VECTOR, Count, 0)
1043 TEST_FIELD_SIZE (UUID_VECTOR, Uuid, 4)
1044 TEST_FIELD_ALIGN (UUID_VECTOR, Uuid, 4)
1045 TEST_FIELD_OFFSET(UUID_VECTOR, Uuid, 4)
1048 static void test_pack_PRPC_CLIENT_INTERFACE(void)
1050 /* PRPC_CLIENT_INTERFACE */
1051 TEST_TYPE_SIZE (PRPC_CLIENT_INTERFACE, 4)
1052 TEST_TYPE_ALIGN (PRPC_CLIENT_INTERFACE, 4)
1053 TEST_TARGET_SIZE (PRPC_CLIENT_INTERFACE, 68)
1054 TEST_TARGET_ALIGN(PRPC_CLIENT_INTERFACE, 4)
1057 static void test_pack_PRPC_DISPATCH_TABLE(void)
1059 /* PRPC_DISPATCH_TABLE */
1060 TEST_TYPE_SIZE (PRPC_DISPATCH_TABLE, 4)
1061 TEST_TYPE_ALIGN (PRPC_DISPATCH_TABLE, 4)
1062 TEST_TARGET_SIZE (PRPC_DISPATCH_TABLE, 12)
1063 TEST_TARGET_ALIGN(PRPC_DISPATCH_TABLE, 4)
1066 static void test_pack_PRPC_MESSAGE(void)
1068 /* PRPC_MESSAGE */
1069 TEST_TYPE_SIZE (PRPC_MESSAGE, 4)
1070 TEST_TYPE_ALIGN (PRPC_MESSAGE, 4)
1071 TEST_TARGET_SIZE (PRPC_MESSAGE, 44)
1072 TEST_TARGET_ALIGN(PRPC_MESSAGE, 4)
1075 static void test_pack_PRPC_PROTSEQ_ENDPOINT(void)
1077 /* PRPC_PROTSEQ_ENDPOINT */
1078 TEST_TYPE_SIZE (PRPC_PROTSEQ_ENDPOINT, 4)
1079 TEST_TYPE_ALIGN (PRPC_PROTSEQ_ENDPOINT, 4)
1080 TEST_TARGET_SIZE (PRPC_PROTSEQ_ENDPOINT, 8)
1081 TEST_TARGET_ALIGN(PRPC_PROTSEQ_ENDPOINT, 4)
1084 static void test_pack_PRPC_SERVER_INTERFACE(void)
1086 /* PRPC_SERVER_INTERFACE */
1087 TEST_TYPE_SIZE (PRPC_SERVER_INTERFACE, 4)
1088 TEST_TYPE_ALIGN (PRPC_SERVER_INTERFACE, 4)
1089 TEST_TARGET_SIZE (PRPC_SERVER_INTERFACE, 68)
1090 TEST_TARGET_ALIGN(PRPC_SERVER_INTERFACE, 4)
1093 static void test_pack_PRPC_SYNTAX_IDENTIFIER(void)
1095 /* PRPC_SYNTAX_IDENTIFIER */
1096 TEST_TYPE_SIZE (PRPC_SYNTAX_IDENTIFIER, 4)
1097 TEST_TYPE_ALIGN (PRPC_SYNTAX_IDENTIFIER, 4)
1098 TEST_TARGET_SIZE (PRPC_SYNTAX_IDENTIFIER, 20)
1099 TEST_TARGET_ALIGN(PRPC_SYNTAX_IDENTIFIER, 4)
1102 static void test_pack_RPC_CLIENT_INTERFACE(void)
1104 /* RPC_CLIENT_INTERFACE */
1105 TEST_TYPE_SIZE (RPC_CLIENT_INTERFACE, 68)
1106 TEST_TYPE_ALIGN (RPC_CLIENT_INTERFACE, 4)
1107 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Length, 4)
1108 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Length, 4)
1109 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Length, 0)
1110 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterfaceId, 20)
1111 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterfaceId, 4)
1112 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterfaceId, 4)
1113 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, TransferSyntax, 20)
1114 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, TransferSyntax, 4)
1115 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, TransferSyntax, 24)
1116 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, DispatchTable, 4)
1117 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, DispatchTable, 4)
1118 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, DispatchTable, 44)
1119 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
1120 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4)
1121 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 48)
1122 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4)
1123 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4)
1124 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 52)
1125 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Reserved, 4)
1126 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Reserved, 4)
1127 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Reserved, 56)
1128 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterpreterInfo, 4)
1129 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterpreterInfo, 4)
1130 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterpreterInfo, 60)
1131 TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Flags, 4)
1132 TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Flags, 4)
1133 TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Flags, 64)
1136 static void test_pack_RPC_DISPATCH_FUNCTION(void)
1138 /* RPC_DISPATCH_FUNCTION */
1141 static void test_pack_RPC_DISPATCH_TABLE(void)
1143 /* RPC_DISPATCH_TABLE */
1144 TEST_TYPE_SIZE (RPC_DISPATCH_TABLE, 12)
1145 TEST_TYPE_ALIGN (RPC_DISPATCH_TABLE, 4)
1146 TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
1147 TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTableCount, 4)
1148 TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTableCount, 0)
1149 TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTable, 4)
1150 TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTable, 4)
1151 TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTable, 4)
1152 TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, Reserved, 4)
1153 TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, Reserved, 4)
1154 TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, Reserved, 8)
1157 static void test_pack_RPC_MESSAGE(void)
1159 /* RPC_MESSAGE */
1160 TEST_TYPE_SIZE (RPC_MESSAGE, 44)
1161 TEST_TYPE_ALIGN (RPC_MESSAGE, 4)
1162 TEST_FIELD_SIZE (RPC_MESSAGE, Handle, 4)
1163 TEST_FIELD_ALIGN (RPC_MESSAGE, Handle, 4)
1164 TEST_FIELD_OFFSET(RPC_MESSAGE, Handle, 0)
1165 TEST_FIELD_SIZE (RPC_MESSAGE, DataRepresentation, 4)
1166 TEST_FIELD_ALIGN (RPC_MESSAGE, DataRepresentation, 4)
1167 TEST_FIELD_OFFSET(RPC_MESSAGE, DataRepresentation, 4)
1168 TEST_FIELD_SIZE (RPC_MESSAGE, Buffer, 4)
1169 TEST_FIELD_ALIGN (RPC_MESSAGE, Buffer, 4)
1170 TEST_FIELD_OFFSET(RPC_MESSAGE, Buffer, 8)
1171 TEST_FIELD_SIZE (RPC_MESSAGE, BufferLength, 4)
1172 TEST_FIELD_ALIGN (RPC_MESSAGE, BufferLength, 4)
1173 TEST_FIELD_OFFSET(RPC_MESSAGE, BufferLength, 12)
1174 TEST_FIELD_SIZE (RPC_MESSAGE, ProcNum, 4)
1175 TEST_FIELD_ALIGN (RPC_MESSAGE, ProcNum, 4)
1176 TEST_FIELD_OFFSET(RPC_MESSAGE, ProcNum, 16)
1177 TEST_FIELD_SIZE (RPC_MESSAGE, TransferSyntax, 4)
1178 TEST_FIELD_ALIGN (RPC_MESSAGE, TransferSyntax, 4)
1179 TEST_FIELD_OFFSET(RPC_MESSAGE, TransferSyntax, 20)
1180 TEST_FIELD_SIZE (RPC_MESSAGE, RpcInterfaceInformation, 4)
1181 TEST_FIELD_ALIGN (RPC_MESSAGE, RpcInterfaceInformation, 4)
1182 TEST_FIELD_OFFSET(RPC_MESSAGE, RpcInterfaceInformation, 24)
1183 TEST_FIELD_SIZE (RPC_MESSAGE, ReservedForRuntime, 4)
1184 TEST_FIELD_ALIGN (RPC_MESSAGE, ReservedForRuntime, 4)
1185 TEST_FIELD_OFFSET(RPC_MESSAGE, ReservedForRuntime, 28)
1186 TEST_FIELD_SIZE (RPC_MESSAGE, ManagerEpv, 4)
1187 TEST_FIELD_ALIGN (RPC_MESSAGE, ManagerEpv, 4)
1188 TEST_FIELD_OFFSET(RPC_MESSAGE, ManagerEpv, 32)
1189 TEST_FIELD_SIZE (RPC_MESSAGE, ImportContext, 4)
1190 TEST_FIELD_ALIGN (RPC_MESSAGE, ImportContext, 4)
1191 TEST_FIELD_OFFSET(RPC_MESSAGE, ImportContext, 36)
1192 TEST_FIELD_SIZE (RPC_MESSAGE, RpcFlags, 4)
1193 TEST_FIELD_ALIGN (RPC_MESSAGE, RpcFlags, 4)
1194 TEST_FIELD_OFFSET(RPC_MESSAGE, RpcFlags, 40)
1197 static void test_pack_RPC_PROTSEQ_ENDPOINT(void)
1199 /* RPC_PROTSEQ_ENDPOINT */
1200 TEST_TYPE_SIZE (RPC_PROTSEQ_ENDPOINT, 8)
1201 TEST_TYPE_ALIGN (RPC_PROTSEQ_ENDPOINT, 4)
1202 TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4)
1203 TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4)
1204 TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 0)
1205 TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, Endpoint, 4)
1206 TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, Endpoint, 4)
1207 TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, Endpoint, 4)
1210 static void test_pack_RPC_SERVER_INTERFACE(void)
1212 /* RPC_SERVER_INTERFACE */
1213 TEST_TYPE_SIZE (RPC_SERVER_INTERFACE, 68)
1214 TEST_TYPE_ALIGN (RPC_SERVER_INTERFACE, 4)
1215 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Length, 4)
1216 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Length, 4)
1217 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Length, 0)
1218 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterfaceId, 20)
1219 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterfaceId, 4)
1220 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterfaceId, 4)
1221 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, TransferSyntax, 20)
1222 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, TransferSyntax, 4)
1223 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, TransferSyntax, 24)
1224 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DispatchTable, 4)
1225 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DispatchTable, 4)
1226 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DispatchTable, 44)
1227 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
1228 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4)
1229 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 48)
1230 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4)
1231 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4)
1232 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 52)
1233 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4)
1234 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4)
1235 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DefaultManagerEpv, 56)
1236 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterpreterInfo, 4)
1237 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterpreterInfo, 4)
1238 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterpreterInfo, 60)
1239 TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Flags, 4)
1240 TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Flags, 4)
1241 TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Flags, 64)
1244 static void test_pack_RPC_SYNTAX_IDENTIFIER(void)
1246 /* RPC_SYNTAX_IDENTIFIER */
1247 TEST_TYPE_SIZE (RPC_SYNTAX_IDENTIFIER, 20)
1248 TEST_TYPE_ALIGN (RPC_SYNTAX_IDENTIFIER, 4)
1249 TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 16)
1250 TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 4)
1251 TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 0)
1252 TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 4)
1253 TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 2)
1254 TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 16)
1257 static void test_pack_RPC_VERSION(void)
1259 /* RPC_VERSION */
1260 TEST_TYPE_SIZE (RPC_VERSION, 4)
1261 TEST_TYPE_ALIGN (RPC_VERSION, 2)
1262 TEST_FIELD_SIZE (RPC_VERSION, MajorVersion, 2)
1263 TEST_FIELD_ALIGN (RPC_VERSION, MajorVersion, 2)
1264 TEST_FIELD_OFFSET(RPC_VERSION, MajorVersion, 0)
1265 TEST_FIELD_SIZE (RPC_VERSION, MinorVersion, 2)
1266 TEST_FIELD_ALIGN (RPC_VERSION, MinorVersion, 2)
1267 TEST_FIELD_OFFSET(RPC_VERSION, MinorVersion, 2)
1270 static void test_pack_ARRAY_INFO(void)
1272 /* ARRAY_INFO */
1273 TEST_TYPE_SIZE (ARRAY_INFO, 24)
1274 TEST_TYPE_ALIGN (ARRAY_INFO, 4)
1275 TEST_FIELD_SIZE (ARRAY_INFO, Dimension, 4)
1276 TEST_FIELD_ALIGN (ARRAY_INFO, Dimension, 4)
1277 TEST_FIELD_OFFSET(ARRAY_INFO, Dimension, 0)
1278 TEST_FIELD_SIZE (ARRAY_INFO, BufferConformanceMark, 4)
1279 TEST_FIELD_ALIGN (ARRAY_INFO, BufferConformanceMark, 4)
1280 TEST_FIELD_OFFSET(ARRAY_INFO, BufferConformanceMark, 4)
1281 TEST_FIELD_SIZE (ARRAY_INFO, BufferVarianceMark, 4)
1282 TEST_FIELD_ALIGN (ARRAY_INFO, BufferVarianceMark, 4)
1283 TEST_FIELD_OFFSET(ARRAY_INFO, BufferVarianceMark, 8)
1284 TEST_FIELD_SIZE (ARRAY_INFO, MaxCountArray, 4)
1285 TEST_FIELD_ALIGN (ARRAY_INFO, MaxCountArray, 4)
1286 TEST_FIELD_OFFSET(ARRAY_INFO, MaxCountArray, 12)
1287 TEST_FIELD_SIZE (ARRAY_INFO, OffsetArray, 4)
1288 TEST_FIELD_ALIGN (ARRAY_INFO, OffsetArray, 4)
1289 TEST_FIELD_OFFSET(ARRAY_INFO, OffsetArray, 16)
1290 TEST_FIELD_SIZE (ARRAY_INFO, ActualCountArray, 4)
1291 TEST_FIELD_ALIGN (ARRAY_INFO, ActualCountArray, 4)
1292 TEST_FIELD_OFFSET(ARRAY_INFO, ActualCountArray, 20)
1295 static void test_pack_COMM_FAULT_OFFSETS(void)
1297 /* COMM_FAULT_OFFSETS */
1298 TEST_TYPE_SIZE (COMM_FAULT_OFFSETS, 4)
1299 TEST_TYPE_ALIGN (COMM_FAULT_OFFSETS, 2)
1300 TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, CommOffset, 2)
1301 TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, CommOffset, 2)
1302 TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, CommOffset, 0)
1303 TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, FaultOffset, 2)
1304 TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, FaultOffset, 2)
1305 TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, FaultOffset, 2)
1308 static void test_pack_CS_STUB_INFO(void)
1310 /* CS_STUB_INFO */
1311 TEST_TYPE_SIZE (CS_STUB_INFO, 12)
1312 TEST_TYPE_ALIGN (CS_STUB_INFO, 4)
1313 TEST_FIELD_SIZE (CS_STUB_INFO, WireCodeset, 4)
1314 TEST_FIELD_ALIGN (CS_STUB_INFO, WireCodeset, 4)
1315 TEST_FIELD_OFFSET(CS_STUB_INFO, WireCodeset, 0)
1316 TEST_FIELD_SIZE (CS_STUB_INFO, DesiredReceivingCodeset, 4)
1317 TEST_FIELD_ALIGN (CS_STUB_INFO, DesiredReceivingCodeset, 4)
1318 TEST_FIELD_OFFSET(CS_STUB_INFO, DesiredReceivingCodeset, 4)
1319 TEST_FIELD_SIZE (CS_STUB_INFO, CSArrayInfo, 4)
1320 TEST_FIELD_ALIGN (CS_STUB_INFO, CSArrayInfo, 4)
1321 TEST_FIELD_OFFSET(CS_STUB_INFO, CSArrayInfo, 8)
1324 static void test_pack_EXPR_EVAL(void)
1326 /* EXPR_EVAL */
1329 static void test_pack_FULL_PTR_TO_REFID_ELEMENT(void)
1331 /* FULL_PTR_TO_REFID_ELEMENT */
1332 TEST_TYPE_SIZE (FULL_PTR_TO_REFID_ELEMENT, 16)
1333 TEST_TYPE_ALIGN (FULL_PTR_TO_REFID_ELEMENT, 4)
1334 TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Next, 4)
1335 TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Next, 4)
1336 TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Next, 0)
1337 TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Pointer, 4)
1338 TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Pointer, 4)
1339 TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Pointer, 4)
1340 TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, RefId, 4)
1341 TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, RefId, 4)
1342 TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, RefId, 8)
1343 TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, State, 1)
1344 TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, State, 1)
1345 TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, State, 12)
1348 static void test_pack_FULL_PTR_XLAT_TABLES(void)
1350 /* FULL_PTR_XLAT_TABLES */
1353 static void test_pack_GENERIC_BINDING_INFO(void)
1355 /* GENERIC_BINDING_INFO */
1356 TEST_FIELD_SIZE (GENERIC_BINDING_INFO, pObj, 4)
1357 TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, pObj, 4)
1358 TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, pObj, 0)
1359 TEST_FIELD_SIZE (GENERIC_BINDING_INFO, Size, 4)
1360 TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, Size, 4)
1361 TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, Size, 4)
1364 static void test_pack_GENERIC_BINDING_ROUTINE_PAIR(void)
1366 /* GENERIC_BINDING_ROUTINE_PAIR */
1369 static void test_pack_MALLOC_FREE_STRUCT(void)
1371 /* MALLOC_FREE_STRUCT */
1374 static void test_pack_MIDL_FORMAT_STRING(void)
1376 /* MIDL_FORMAT_STRING */
1377 TEST_FIELD_SIZE (MIDL_FORMAT_STRING, Pad, 2)
1378 TEST_FIELD_ALIGN (MIDL_FORMAT_STRING, Pad, 2)
1379 TEST_FIELD_OFFSET(MIDL_FORMAT_STRING, Pad, 0)
1382 static void test_pack_MIDL_SERVER_INFO(void)
1384 /* MIDL_SERVER_INFO */
1385 TEST_TYPE_SIZE (MIDL_SERVER_INFO, 32)
1386 TEST_TYPE_ALIGN (MIDL_SERVER_INFO, 4)
1387 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pStubDesc, 4)
1388 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pStubDesc, 4)
1389 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pStubDesc, 0)
1390 TEST_FIELD_SIZE (MIDL_SERVER_INFO, DispatchTable, 4)
1391 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, DispatchTable, 4)
1392 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, DispatchTable, 4)
1393 TEST_FIELD_SIZE (MIDL_SERVER_INFO, ProcString, 4)
1394 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ProcString, 4)
1395 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ProcString, 8)
1396 TEST_FIELD_SIZE (MIDL_SERVER_INFO, FmtStringOffset, 4)
1397 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, FmtStringOffset, 4)
1398 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, FmtStringOffset, 12)
1399 TEST_FIELD_SIZE (MIDL_SERVER_INFO, ThunkTable, 4)
1400 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ThunkTable, 4)
1401 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ThunkTable, 16)
1402 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pTransferSyntax, 4)
1403 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pTransferSyntax, 4)
1404 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pTransferSyntax, 20)
1405 TEST_FIELD_SIZE (MIDL_SERVER_INFO, nCount, 4)
1406 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, nCount, 4)
1407 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, nCount, 24)
1408 TEST_FIELD_SIZE (MIDL_SERVER_INFO, pSyntaxInfo, 4)
1409 TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pSyntaxInfo, 4)
1410 TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pSyntaxInfo, 28)
1413 static void test_pack_MIDL_STUB_DESC(void)
1415 /* MIDL_STUB_DESC */
1416 TEST_FIELD_SIZE (MIDL_STUB_DESC, RpcInterfaceInformation, 4)
1417 TEST_FIELD_ALIGN (MIDL_STUB_DESC, RpcInterfaceInformation, 4)
1418 TEST_FIELD_OFFSET(MIDL_STUB_DESC, RpcInterfaceInformation, 0)
1421 static void test_pack_MIDL_STUB_MESSAGE(void)
1423 /* MIDL_STUB_MESSAGE */
1424 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, RpcMsg, 4)
1425 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, RpcMsg, 4)
1426 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, RpcMsg, 0)
1427 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Buffer, 4)
1428 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Buffer, 4)
1429 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Buffer, 4)
1430 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferStart, 4)
1431 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferStart, 4)
1432 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferStart, 8)
1433 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferEnd, 4)
1434 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferEnd, 4)
1435 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferEnd, 12)
1436 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferMark, 4)
1437 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferMark, 4)
1438 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferMark, 16)
1439 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferLength, 4)
1440 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferLength, 4)
1441 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferLength, 20)
1442 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MemorySize, 4)
1443 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MemorySize, 4)
1444 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MemorySize, 24)
1445 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Memory, 4)
1446 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Memory, 4)
1447 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Memory, 28)
1448 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
1449 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ReuseBuffer, 4)
1450 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ReuseBuffer, 36)
1451 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4)
1452 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4)
1453 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pAllocAllNodesContext, 40)
1454 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pPointerQueueState, 4)
1455 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pPointerQueueState, 4)
1456 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pPointerQueueState, 44)
1457 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
1458 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4)
1459 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 48)
1460 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, PointerBufferMark, 4)
1461 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, PointerBufferMark, 4)
1462 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, PointerBufferMark, 52)
1463 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
1464 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, CorrDespIncrement, 1)
1465 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, CorrDespIncrement, 56)
1466 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, uFlags, 1)
1467 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, uFlags, 1)
1468 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, uFlags, 57)
1469 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MaxCount, 4)
1470 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MaxCount, 4)
1471 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MaxCount, 60)
1472 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Offset, 4)
1473 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Offset, 4)
1474 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Offset, 64)
1475 TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ActualCount, 4)
1476 TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ActualCount, 4)
1477 TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ActualCount, 68)
1480 static void test_pack_MIDL_STUBLESS_PROXY_INFO(void)
1482 /* MIDL_STUBLESS_PROXY_INFO */
1483 TEST_TYPE_SIZE (MIDL_STUBLESS_PROXY_INFO, 24)
1484 TEST_TYPE_ALIGN (MIDL_STUBLESS_PROXY_INFO, 4)
1485 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 4)
1486 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 4)
1487 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pStubDesc, 0)
1488 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4)
1489 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4)
1490 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4)
1491 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4)
1492 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4)
1493 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8)
1494 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4)
1495 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4)
1496 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 12)
1497 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, nCount, 4)
1498 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, nCount, 4)
1499 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, nCount, 16)
1500 TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 4)
1501 TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 4)
1502 TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 20)
1505 static void test_pack_MIDL_SYNTAX_INFO(void)
1507 /* MIDL_SYNTAX_INFO */
1508 TEST_TYPE_SIZE (MIDL_SYNTAX_INFO, 48)
1509 TEST_TYPE_ALIGN (MIDL_SYNTAX_INFO, 4)
1510 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TransferSyntax, 20)
1511 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TransferSyntax, 4)
1512 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TransferSyntax, 0)
1513 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, DispatchTable, 4)
1514 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, DispatchTable, 4)
1515 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, DispatchTable, 20)
1516 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, ProcString, 4)
1517 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, ProcString, 4)
1518 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, ProcString, 24)
1519 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, FmtStringOffset, 4)
1520 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, FmtStringOffset, 4)
1521 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, FmtStringOffset, 28)
1522 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TypeString, 4)
1523 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TypeString, 4)
1524 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TypeString, 32)
1525 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4)
1526 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4)
1527 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 36)
1528 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved1, 4)
1529 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved1, 4)
1530 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved1, 40)
1531 TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved2, 4)
1532 TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved2, 4)
1533 TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved2, 44)
1536 static void test_pack_NDR_CCONTEXT(void)
1538 /* NDR_CCONTEXT */
1539 TEST_TYPE_SIZE (NDR_CCONTEXT, 4)
1540 TEST_TYPE_ALIGN (NDR_CCONTEXT, 4)
1543 static void test_pack_NDR_NOTIFY_ROUTINE(void)
1545 /* NDR_NOTIFY_ROUTINE */
1548 static void test_pack_NDR_NOTIFY2_ROUTINE(void)
1550 /* NDR_NOTIFY2_ROUTINE */
1553 static void test_pack_NDR_RUNDOWN(void)
1555 /* NDR_RUNDOWN */
1558 static void test_pack_NDR_SCONTEXT(void)
1560 /* NDR_SCONTEXT */
1561 TEST_TYPE_SIZE (NDR_SCONTEXT, 4)
1562 TEST_TYPE_ALIGN (NDR_SCONTEXT, 4)
1565 static void test_pack_NDR_USER_MARSHAL_INFO(void)
1567 /* NDR_USER_MARSHAL_INFO */
1568 TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
1569 TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO, InformationLevel, 4)
1570 TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO, InformationLevel, 0)
1573 static void test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(void)
1575 /* NDR_USER_MARSHAL_INFO_LEVEL1 */
1576 TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 4)
1577 TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 4)
1578 TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 0)
1579 TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4)
1580 TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4)
1581 TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4)
1584 static void test_pack_PARRAY_INFO(void)
1586 /* PARRAY_INFO */
1587 TEST_TYPE_SIZE (PARRAY_INFO, 4)
1588 TEST_TYPE_ALIGN (PARRAY_INFO, 4)
1589 TEST_TARGET_SIZE (PARRAY_INFO, 24)
1590 TEST_TARGET_ALIGN(PARRAY_INFO, 4)
1593 static void test_pack_PFORMAT_STRING(void)
1595 /* PFORMAT_STRING */
1596 TEST_TYPE_SIZE (PFORMAT_STRING, 4)
1597 TEST_TYPE_ALIGN (PFORMAT_STRING, 4)
1600 static void test_pack_PFULL_PTR_TO_REFID_ELEMENT(void)
1602 /* PFULL_PTR_TO_REFID_ELEMENT */
1603 TEST_TYPE_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 4)
1604 TEST_TYPE_ALIGN (PFULL_PTR_TO_REFID_ELEMENT, 4)
1605 TEST_TARGET_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 16)
1606 TEST_TARGET_ALIGN(PFULL_PTR_TO_REFID_ELEMENT, 4)
1609 static void test_pack_PFULL_PTR_XLAT_TABLES(void)
1611 /* PFULL_PTR_XLAT_TABLES */
1612 TEST_TYPE_SIZE (PFULL_PTR_XLAT_TABLES, 4)
1613 TEST_TYPE_ALIGN (PFULL_PTR_XLAT_TABLES, 4)
1616 static void test_pack_PGENERIC_BINDING_INFO(void)
1618 /* PGENERIC_BINDING_INFO */
1619 TEST_TYPE_SIZE (PGENERIC_BINDING_INFO, 4)
1620 TEST_TYPE_ALIGN (PGENERIC_BINDING_INFO, 4)
1623 static void test_pack_PGENERIC_BINDING_ROUTINE_PAIR(void)
1625 /* PGENERIC_BINDING_ROUTINE_PAIR */
1626 TEST_TYPE_SIZE (PGENERIC_BINDING_ROUTINE_PAIR, 4)
1627 TEST_TYPE_ALIGN (PGENERIC_BINDING_ROUTINE_PAIR, 4)
1630 static void test_pack_PMIDL_SERVER_INFO(void)
1632 /* PMIDL_SERVER_INFO */
1633 TEST_TYPE_SIZE (PMIDL_SERVER_INFO, 4)
1634 TEST_TYPE_ALIGN (PMIDL_SERVER_INFO, 4)
1635 TEST_TARGET_SIZE (PMIDL_SERVER_INFO, 32)
1636 TEST_TARGET_ALIGN(PMIDL_SERVER_INFO, 4)
1639 static void test_pack_PMIDL_STUB_DESC(void)
1641 /* PMIDL_STUB_DESC */
1642 TEST_TYPE_SIZE (PMIDL_STUB_DESC, 4)
1643 TEST_TYPE_ALIGN (PMIDL_STUB_DESC, 4)
1646 static void test_pack_PMIDL_STUB_MESSAGE(void)
1648 /* PMIDL_STUB_MESSAGE */
1649 TEST_TYPE_SIZE (PMIDL_STUB_MESSAGE, 4)
1650 TEST_TYPE_ALIGN (PMIDL_STUB_MESSAGE, 4)
1653 static void test_pack_PMIDL_STUBLESS_PROXY_INFO(void)
1655 /* PMIDL_STUBLESS_PROXY_INFO */
1656 TEST_TYPE_SIZE (PMIDL_STUBLESS_PROXY_INFO, 4)
1657 TEST_TYPE_ALIGN (PMIDL_STUBLESS_PROXY_INFO, 4)
1658 TEST_TARGET_SIZE (PMIDL_STUBLESS_PROXY_INFO, 24)
1659 TEST_TARGET_ALIGN(PMIDL_STUBLESS_PROXY_INFO, 4)
1662 static void test_pack_PMIDL_SYNTAX_INFO(void)
1664 /* PMIDL_SYNTAX_INFO */
1665 TEST_TYPE_SIZE (PMIDL_SYNTAX_INFO, 4)
1666 TEST_TYPE_ALIGN (PMIDL_SYNTAX_INFO, 4)
1667 TEST_TARGET_SIZE (PMIDL_SYNTAX_INFO, 48)
1668 TEST_TARGET_ALIGN(PMIDL_SYNTAX_INFO, 4)
1671 static void test_pack_PNDR_ASYNC_MESSAGE(void)
1673 /* PNDR_ASYNC_MESSAGE */
1674 TEST_TYPE_SIZE (PNDR_ASYNC_MESSAGE, 4)
1675 TEST_TYPE_ALIGN (PNDR_ASYNC_MESSAGE, 4)
1678 static void test_pack_PNDR_CORRELATION_INFO(void)
1680 /* PNDR_CORRELATION_INFO */
1681 TEST_TYPE_SIZE (PNDR_CORRELATION_INFO, 4)
1682 TEST_TYPE_ALIGN (PNDR_CORRELATION_INFO, 4)
1685 static void test_pack_PSCONTEXT_QUEUE(void)
1687 /* PSCONTEXT_QUEUE */
1688 TEST_TYPE_SIZE (PSCONTEXT_QUEUE, 4)
1689 TEST_TYPE_ALIGN (PSCONTEXT_QUEUE, 4)
1690 TEST_TARGET_SIZE (PSCONTEXT_QUEUE, 8)
1691 TEST_TARGET_ALIGN(PSCONTEXT_QUEUE, 4)
1694 static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void)
1696 /* PXMIT_ROUTINE_QUINTUPLE */
1697 TEST_TYPE_SIZE (PXMIT_ROUTINE_QUINTUPLE, 4)
1698 TEST_TYPE_ALIGN (PXMIT_ROUTINE_QUINTUPLE, 4)
1701 static void test_pack_SCONTEXT_QUEUE(void)
1703 /* SCONTEXT_QUEUE */
1704 TEST_TYPE_SIZE (SCONTEXT_QUEUE, 8)
1705 TEST_TYPE_ALIGN (SCONTEXT_QUEUE, 4)
1706 TEST_FIELD_SIZE (SCONTEXT_QUEUE, NumberOfObjects, 4)
1707 TEST_FIELD_ALIGN (SCONTEXT_QUEUE, NumberOfObjects, 4)
1708 TEST_FIELD_OFFSET(SCONTEXT_QUEUE, NumberOfObjects, 0)
1709 TEST_FIELD_SIZE (SCONTEXT_QUEUE, ArrayOfObjects, 4)
1710 TEST_FIELD_ALIGN (SCONTEXT_QUEUE, ArrayOfObjects, 4)
1711 TEST_FIELD_OFFSET(SCONTEXT_QUEUE, ArrayOfObjects, 4)
1714 static void test_pack_SERVER_ROUTINE(void)
1716 /* SERVER_ROUTINE */
1719 static void test_pack_STUB_THUNK(void)
1721 /* STUB_THUNK */
1724 static void test_pack_USER_MARSHAL_CB(void)
1726 /* USER_MARSHAL_CB */
1727 TEST_FIELD_SIZE (USER_MARSHAL_CB, Flags, 4)
1728 TEST_FIELD_ALIGN (USER_MARSHAL_CB, Flags, 4)
1729 TEST_FIELD_OFFSET(USER_MARSHAL_CB, Flags, 0)
1730 TEST_FIELD_SIZE (USER_MARSHAL_CB, pStubMsg, 4)
1731 TEST_FIELD_ALIGN (USER_MARSHAL_CB, pStubMsg, 4)
1732 TEST_FIELD_OFFSET(USER_MARSHAL_CB, pStubMsg, 4)
1733 TEST_FIELD_SIZE (USER_MARSHAL_CB, pReserve, 4)
1734 TEST_FIELD_ALIGN (USER_MARSHAL_CB, pReserve, 4)
1735 TEST_FIELD_OFFSET(USER_MARSHAL_CB, pReserve, 8)
1736 TEST_FIELD_SIZE (USER_MARSHAL_CB, Signature, 4)
1737 TEST_FIELD_ALIGN (USER_MARSHAL_CB, Signature, 4)
1738 TEST_FIELD_OFFSET(USER_MARSHAL_CB, Signature, 12)
1741 static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void)
1743 /* USER_MARSHAL_FREEING_ROUTINE */
1746 static void test_pack_USER_MARSHAL_MARSHALLING_ROUTINE(void)
1748 /* USER_MARSHAL_MARSHALLING_ROUTINE */
1751 static void test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE(void)
1753 /* USER_MARSHAL_ROUTINE_QUADRUPLE */
1756 static void test_pack_USER_MARSHAL_SIZING_ROUTINE(void)
1758 /* USER_MARSHAL_SIZING_ROUTINE */
1761 static void test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE(void)
1763 /* USER_MARSHAL_UNMARSHALLING_ROUTINE */
1766 static void test_pack_XMIT_HELPER_ROUTINE(void)
1768 /* XMIT_HELPER_ROUTINE */
1771 static void test_pack_XMIT_ROUTINE_QUINTUPLE(void)
1773 /* XMIT_ROUTINE_QUINTUPLE */
1776 static void test_pack_PRPC_STUB_FUNCTION(void)
1778 /* PRPC_STUB_FUNCTION */
1781 #endif /* _WIN64 */
1783 static void test_pack(void)
1785 test_pack_ARRAY_INFO();
1786 test_pack_COMM_FAULT_OFFSETS();
1787 test_pack_CS_STUB_INFO();
1788 test_pack_EXPR_EVAL();
1789 test_pack_FULL_PTR_TO_REFID_ELEMENT();
1790 test_pack_FULL_PTR_XLAT_TABLES();
1791 test_pack_GENERIC_BINDING_INFO();
1792 test_pack_GENERIC_BINDING_ROUTINE_PAIR();
1793 test_pack_I_RPC_HANDLE();
1794 test_pack_MALLOC_FREE_STRUCT();
1795 test_pack_MIDL_FORMAT_STRING();
1796 test_pack_MIDL_SERVER_INFO();
1797 test_pack_MIDL_STUBLESS_PROXY_INFO();
1798 test_pack_MIDL_STUB_DESC();
1799 test_pack_MIDL_STUB_MESSAGE();
1800 test_pack_MIDL_SYNTAX_INFO();
1801 test_pack_NDR_CCONTEXT();
1802 test_pack_NDR_NOTIFY2_ROUTINE();
1803 test_pack_NDR_NOTIFY_ROUTINE();
1804 test_pack_NDR_RUNDOWN();
1805 test_pack_NDR_SCONTEXT();
1806 test_pack_NDR_USER_MARSHAL_INFO();
1807 test_pack_NDR_USER_MARSHAL_INFO_LEVEL1();
1808 test_pack_PARRAY_INFO();
1809 test_pack_PFORMAT_STRING();
1810 test_pack_PFULL_PTR_TO_REFID_ELEMENT();
1811 test_pack_PFULL_PTR_XLAT_TABLES();
1812 test_pack_PGENERIC_BINDING_INFO();
1813 test_pack_PGENERIC_BINDING_ROUTINE_PAIR();
1814 test_pack_PMIDL_SERVER_INFO();
1815 test_pack_PMIDL_STUBLESS_PROXY_INFO();
1816 test_pack_PMIDL_STUB_DESC();
1817 test_pack_PMIDL_STUB_MESSAGE();
1818 test_pack_PMIDL_SYNTAX_INFO();
1819 test_pack_PNDR_ASYNC_MESSAGE();
1820 test_pack_PNDR_CORRELATION_INFO();
1821 test_pack_PRPC_CLIENT_INTERFACE();
1822 test_pack_PRPC_DISPATCH_TABLE();
1823 test_pack_PRPC_MESSAGE();
1824 test_pack_PRPC_POLICY();
1825 test_pack_PRPC_PROTSEQ_ENDPOINT();
1826 test_pack_PRPC_SERVER_INTERFACE();
1827 test_pack_PRPC_STUB_FUNCTION();
1828 test_pack_PRPC_SYNTAX_IDENTIFIER();
1829 test_pack_PSCONTEXT_QUEUE();
1830 test_pack_PXMIT_ROUTINE_QUINTUPLE();
1831 test_pack_RPC_AUTHZ_HANDLE();
1832 test_pack_RPC_AUTH_IDENTITY_HANDLE();
1833 test_pack_RPC_AUTH_KEY_RETRIEVAL_FN();
1834 test_pack_RPC_BINDING_HANDLE();
1835 test_pack_RPC_BINDING_VECTOR();
1836 test_pack_RPC_CLIENT_INTERFACE();
1837 test_pack_RPC_DISPATCH_FUNCTION();
1838 test_pack_RPC_DISPATCH_TABLE();
1839 test_pack_RPC_IF_HANDLE();
1840 test_pack_RPC_IF_ID();
1841 test_pack_RPC_MESSAGE();
1842 test_pack_RPC_POLICY();
1843 test_pack_RPC_PROTSEQ_ENDPOINT();
1844 test_pack_RPC_SERVER_INTERFACE();
1845 test_pack_RPC_STATUS();
1846 test_pack_RPC_SYNTAX_IDENTIFIER();
1847 test_pack_RPC_VERSION();
1848 test_pack_SCONTEXT_QUEUE();
1849 test_pack_SERVER_ROUTINE();
1850 test_pack_STUB_THUNK();
1851 test_pack_USER_MARSHAL_CB();
1852 test_pack_USER_MARSHAL_FREEING_ROUTINE();
1853 test_pack_USER_MARSHAL_MARSHALLING_ROUTINE();
1854 test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE();
1855 test_pack_USER_MARSHAL_SIZING_ROUTINE();
1856 test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE();
1857 test_pack_UUID_VECTOR();
1858 test_pack_XMIT_HELPER_ROUTINE();
1859 test_pack_XMIT_ROUTINE_QUINTUPLE();
1862 START_TEST(generated)
1864 test_pack();