92 {{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x34}},{0,0}},
93 {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
112 static const unsigned char fmtstr_up_char[] =
170 ok(l2 ==
l,
"%d\n", l2);
176 void *memsrc,
DWORD srcsize,
177 const void *wiredata,
179 int(*
cmp)(
const void*,
const void*,
size_t),
180 int num_additional_allocs,
188 unsigned char *
mem, *mem_orig;
216 if (srcsize == 8 && wiredatalen == 16 && StubMsg.
Buffer - StubMsg.
BufferStart == 12)
224 ok(!
memcmp(StubMsg.
BufferStart, wiredata, wiredatalen),
"%s: incorrectly marshaled\n", msgpfx);
234 ok(
size == srcsize +
sizeof(
void *),
"%s: mem size %u\n", msgpfx,
size);
236 ok(
size == srcsize,
"%s: mem size %u\n", msgpfx,
size);
244 ok(
size == srcsize +
sizeof(
void *) + 16,
"%s: mem size %u\n", msgpfx,
size);
246 ok(
size == srcsize + 16,
"%s: mem size %u\n", msgpfx,
size);
254 ok(
size == srcsize +
sizeof(
void *) + (srcsize == 8 ? 8 :
sizeof(
void *)),
"%s: mem size %u\n", msgpfx,
size);
256 ok(
size == srcsize + (srcsize == 8 ? 8 :
sizeof(
void *)),
"%s: mem size %u\n", msgpfx,
size);
271 ok(
mem == mem_orig,
"%s: mem has changed %p %p\n", msgpfx,
mem, mem_orig);
272 ok(!
cmp(
mem, memsrc, srcsize),
"%s: incorrectly unmarshaled\n", msgpfx);
298 ok(
mem == mem_orig,
"%s: mem has changed %p %p\n", msgpfx,
mem, mem_orig);
299 ok(!
cmp(
mem, memsrc, srcsize),
"%s: incorrectly unmarshaled\n", msgpfx);
315 if (formattypes[0] !=
FC_RP)
324 ok(!
cmp(
mem, memsrc,
size),
"%s: incorrectly unmarshaled\n", msgpfx);
343 ok(!
cmp(
mem, memsrc,
size),
"%s: incorrectly unmarshaled\n", msgpfx);
364 ok(!!
mem,
"%s: mem was not allocated\n", msgpfx);
365 ok(!
cmp(
mem, memsrc, srcsize),
"%s: incorrectly unmarshaled\n", msgpfx);
396 ok(!!
mem,
"%s: mem was not allocated\n", msgpfx);
397 ok(!
cmp(
mem, memsrc, srcsize),
"%s: incorrectly unmarshaled\n", msgpfx);
429 ok(
mem == mem_orig,
"%s: mem has changed %p %p\n", msgpfx,
mem, mem_orig);
432 ok(
mem != mem_orig,
"%s: mem has not changed\n", msgpfx);
435 ok(!
cmp(
mem, memsrc, srcsize),
"%s: incorrectly unmarshaled\n", msgpfx);
466 ok(
mem == mem_orig,
"%s: mem has changed %p %p\n", msgpfx,
mem, mem_orig);
469 ok(
mem != mem_orig,
"%s: mem has not changed\n", msgpfx);
472 ok(!
cmp(
mem, memsrc, srcsize),
"%s: incorrectly unmarshaled\n", msgpfx);
499 return memcmp(*(
const void *
const *)
s1, *(
const void *
const *)
s2,
num);
505 unsigned char wiredata[16];
507 unsigned char *ch_ptr;
515 static const unsigned char fmtstr_up_char[] =
521 static const unsigned char fmtstr_up_byte[] =
527 static const unsigned char fmtstr_up_small[] =
533 static const unsigned char fmtstr_up_usmall[] =
539 static const unsigned char fmtstr_rp_char[] =
545 static const unsigned char fmtstr_rpup_char_onstack_deref[] =
553 static const unsigned char fmtstr_rpup_char_onstack[] =
561 static const unsigned char fmtstr_rpup_char_deref[] =
570 static const unsigned char fmtstr_up_wchar[] =
576 static const unsigned char fmtstr_up_short[] =
582 static const unsigned char fmtstr_up_ushort[] =
588 static const unsigned char fmtstr_up_enum16[] =
594 static const unsigned char fmtstr_up_long[] =
600 static const unsigned char fmtstr_up_ulong[] =
606 static const unsigned char fmtstr_up_enum32[] =
612 static const unsigned char fmtstr_up_errorstatus[] =
619 static const unsigned char fmtstr_up_longlong[] =
625 static const unsigned char fmtstr_up_float[] =
631 static const unsigned char fmtstr_up_double[] =
641 *(
unsigned int *)wiredata = 0x20000;
643 *(
unsigned int *)wiredata = (
UINT_PTR)ch_ptr;
659 *(
unsigned int *)wiredata = 0x20000;
661 *(
unsigned int *)wiredata = (
UINT_PTR)&
s;
662 *(
unsigned short*)(wiredata + 4) =
s;
670 *(
unsigned int *)wiredata = 0x20000;
672 *(
unsigned int *)wiredata = (
UINT_PTR)&
i;
673 *(
unsigned short*)(wiredata + 4) =
i;
678 *(
unsigned int *)wiredata = 0x20000;
680 *(
unsigned int *)wiredata = (
UINT_PTR)&
l;
681 *(
ULONG*)(wiredata + 4) =
l;
690 *(
unsigned int *)wiredata = 0x20000;
693 *(
unsigned int *)(wiredata + 4) = 0;
699 *(
unsigned int *)wiredata = 0x20000;
701 *(
unsigned int *)wiredata = (
UINT_PTR)&
f;
702 *(
float*)(wiredata + 4) =
f;
707 *(
unsigned int *)wiredata = 0x20000;
709 *(
unsigned int *)wiredata = (
UINT_PTR)&
d;
710 *(
unsigned int *)(wiredata + 4) = 0;
711 *(
double*)(wiredata + 8) =
d;
726 unsigned char *
mem, *mem_orig;
728 static const unsigned char fmtstr_ref_unique_out[] =
753 &fmtstr_ref_unique_out[4] );
766 ok(*(
unsigned int *)StubMsg.
BufferStart != 0,
"pointer ID marshalled incorrectly\n");
767 ok(*(
unsigned char *)(StubMsg.
BufferStart + 4) == 0x22,
"char data marshalled incorrectly: 0x%x\n",
780 ok(
mem == mem_orig,
"mem alloced\n");
786 ok(
mem == mem_orig,
"mem alloced\n");
839 ok(
mem == mem_orig,
"mem alloced\n");
847 ok(
mem == mem_orig,
"mem alloced\n");
871 void *memsrc,
DWORD srcsize,
872 const void *wiredata,
874 int(*
cmp)(
const void*,
const void*,
size_t),
875 int num_additional_allocs,
883 unsigned char *
mem, *mem_orig;
908 ok(
size == srcsize,
"%s: mem size %u\n", msgpfx,
size);
914 ok(StubMsg.
MemorySize == ((srcsize + 3) & ~3) + srcsize,
"%s: mem size %u\n", msgpfx,
size);
925 ok(
mem == mem_orig,
"%s: mem has changed %p %p\n", msgpfx,
mem, mem_orig);
926 ok(!
cmp(
mem, memsrc, srcsize),
"%s: incorrectly unmarshaled\n", msgpfx);
930 ok(StubMsg.
MemorySize == 0,
"%s: memorysize touched in unmarshal\n", msgpfx);
939 ok(
mem == mem_orig,
"%s: mem has changed %p %p\n", msgpfx,
mem, mem_orig);
940 ok(!
cmp(
mem, memsrc, srcsize),
"%s: incorrectly unmarshaled\n", msgpfx);
944 ok(StubMsg.
MemorySize == 0,
"%s: memorysize touched in unmarshal\n", msgpfx);
960 ok(!
cmp(
mem, memsrc, srcsize),
"%s: incorrectly unmarshaled\n", msgpfx);
963 ok(StubMsg.
MemorySize == 0,
"%s: memorysize touched in unmarshal\n", msgpfx);
977 ok(
mem != mem_orig,
"mem not changed %p %p\n",
mem, mem_orig);
978 ok(!
cmp(
mem, memsrc, srcsize),
"incorrectly unmarshaled\n");
982 ok(StubMsg.
MemorySize == 0,
"memorysize touched in unmarshal\n");
991 ok(
mem != mem_orig,
"mem not changed %p %p\n",
mem, mem_orig);
992 ok(!
cmp(
mem, memsrc, srcsize),
"incorrectly unmarshaled\n");
996 ok(StubMsg.
MemorySize == 0,
"memorysize touched in unmarshal\n");
1007 ok(
mem != mem_orig,
"mem not changed %p %p\n",
mem, mem_orig);
1009 ok(!
cmp(
mem, memsrc, srcsize),
"incorrectly unmarshaled\n");
1013 ok(StubMsg.
MemorySize == 0,
"memorysize touched in unmarshal\n");
1025 ok(!
cmp(
mem, memsrc, srcsize),
"incorrectly unmarshaled\n");
1029 ok(StubMsg.
MemorySize == 0,
"memorysize touched in unmarshal\n");
1047 const ps1_t *p1, *p2;
1052 if(p1->
l1 != p2->
l1)
1060 else if(p1->
pl1 || p2->
pl1)
1068 else if(p1->
pc1 || p2->
pc1)
1076 unsigned char wiredata[28];
1082 static const unsigned char fmtstr_simple_struct[] =
1104 static const unsigned char fmtstr_pointer_struct[] =
1162 s1.ll = ((
ULONGLONG) 0xbadefeed << 32) | 0x2468ace0;
1165 memcpy(wiredata, &
s1, wiredatalen);
1169 *(
unsigned int *)wiredata = 0x20000;
1172 memcpy(wiredata + 4, &
s1, wiredatalen);
1175 if (
sizeof(
void *) == 8)
return;
1178 memset(&ps1, 0,
sizeof(ps1));
1181 ps1.
l1 = 0xdeadbeef;
1186 *(
unsigned int *)(wiredata + 4) = 0xdeadbeef;
1189 *(
unsigned int *)(wiredata + 8) = 0x20000;
1190 *(
unsigned int *)(wiredata + 12) = 0x20004;
1194 *(
unsigned int *)(wiredata + 8) = (
UINT_PTR)&
l;
1195 *(
unsigned int *)(wiredata + 12) = (
UINT_PTR)&
c;
1203 *(
unsigned int *)wiredata = 0x20000;
1204 *(
unsigned int *)(wiredata + 8) = 0x20004;
1205 *(
unsigned int *)(wiredata + 12) = 0x20008;
1208 *(
unsigned int *)wiredata = (
UINT_PTR)&ps1;
1227 static const unsigned char fmtstr[] =
1240 memsrc_orig = heap_alloc_zero(
sizeof(
struct aligned) + 8);
1244 memsrc->
a = 0xdeadbeef;
1245 memsrc->
b = ((
ULONGLONG) 0xbadefeed << 32) | 0x2468ace0;
1266 ok(!
memcmp(
mem, memsrc,
sizeof(*memsrc)),
"struct wasn't unmarshalled correctly\n");
1267 StubMsg.pfnFree(
mem);
1289 IPersist_AddRef(iface);
1336 static const unsigned char fmtstr_ip[] =
1373 ok(server_obj.
ref > 2,
"got %d references\n", server_obj.
ref);
1378 ok(server_obj.
ref > 1,
"got %d references\n", server_obj.
ref);
1386 ok(!!
proxy,
"mem not alloced\n");
1389 ok(server_obj.
ref > 1,
"got %d references\n", server_obj.
ref);
1396 ok(
ref == 1,
"got %d references\n",
ref);
1397 ok(server_obj.
ref == 1,
"got %d references\n", server_obj.
ref);
1408 ok(server_obj.
ref > 2,
"got %d references\n", server_obj.
ref);
1413 ok(server_obj.
ref > 1,
"got %d references\n", server_obj.
ref);
1419 IPersist_AddRef(
proxy);
1425 ok(server_obj.
ref > 1,
"got %d references\n", server_obj.
ref);
1426 ok(client_obj.
ref == 1,
"got %d references\n", client_obj.
ref);
1433 ok(
ref == 1,
"got %d references\n",
ref);
1434 ok(server_obj.
ref == 1,
"got %d references\n", server_obj.
ref);
1444 ok(client_obj.
ref > 2,
"got %d references\n", client_obj.
ref);
1454 ok(!!
proxy,
"mem not alloced\n");
1457 ok(client_obj.
ref > 2,
"got %d references\n", client_obj.
ref);
1464 ok(client_obj.
ref > 1,
"got %d references\n", client_obj.
ref);
1465 ok(
ref == client_obj.
ref,
"expected %d references, got %d\n", client_obj.
ref,
ref);
1468 ok(client_obj.
ref == 1,
"got %d references\n", client_obj.
ref);
1478 ok(client_obj.
ref > 2,
"got %d references\n", client_obj.
ref);
1488 ok(!!
proxy,
"mem not alloced\n");
1491 ok(client_obj.
ref > 2,
"got %d references\n", client_obj.
ref);
1494 ok(client_obj.
ref > 1,
"got %d references\n", client_obj.
ref);
1501 ok(
ref == 1,
"got %d references\n",
ref);
1502 ok(client_obj.
ref == 1,
"got %d references\n", client_obj.
ref);
1513 ok(client_obj.
ref > 2,
"got %d references\n", client_obj.
ref);
1521 IPersist_AddRef(
proxy);
1527 ok(client_obj.
ref > 2,
"got %d references\n", client_obj.
ref);
1528 ok(server_obj.
ref == 2,
"got %d references\n", server_obj.
ref);
1536 ok(client_obj.
ref > 1,
"got %d references\n", client_obj.
ref);
1537 ok(
ref == client_obj.
ref,
"expected %d references, got %d\n", client_obj.
ref,
ref);
1540 ok(client_obj.
ref == 1,
"got %d references\n", client_obj.
ref);
1559 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1560 ok(RefId == 0x1,
"RefId should be 0x1 instead of 0x%x\n", RefId);
1563 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1564 ok(RefId == 0x1,
"RefId should be 0x1 instead of 0x%x\n", RefId);
1567 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1568 ok(RefId == 0x2,
"RefId should be 0x2 instead of 0x%x\n", RefId);
1571 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1572 ok(RefId == 0x3,
"RefId should be 0x3 instead of 0x%x\n", RefId);
1575 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1576 ok(RefId == 0,
"RefId should be 0 instead of 0x%x\n", RefId);
1581 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1584 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1585 ok(Pointer == (
void *)0xcafebabe,
"Pointer should be 0xcafebabe instead of %p\n", Pointer);
1588 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1589 ok(Pointer ==
NULL,
"Pointer should be NULL instead of %p\n", Pointer);
1594 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1595 ok(Pointer == (
void *)0xdeadbabe,
"Pointer should be (void *)0xdeadbabe instead of %p\n", Pointer);
1604 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1605 ok(Pointer ==
NULL,
"Pointer should be NULL instead of %p\n", Pointer);
1610 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1611 ok(Pointer == (
void *)0xcafebabe,
"Pointer should be (void *)0xcafebabe instead of %p\n", Pointer);
1614 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1615 ok(Pointer == (
void *)0xcafebabe,
"Pointer should be (void *)0xcafebabe instead of %p\n", Pointer);
1620 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1621 ok(RefId == 0x3,
"RefId should be 0x3 instead of 0x%x\n", RefId);
1624 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1625 ok(RefId == 0x3,
"RefId should be 0x3 instead of 0x%x\n", RefId);
1628 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1629 ok(RefId == 0x3,
"RefId should be 0x3 instead of 0x%x\n", RefId);
1632 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1633 ok(RefId == 0x2,
"RefId should be 0x2 instead of 0x%x\n", RefId);
1636 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1637 ok(RefId == 0x4,
"RefId should be 0x4 instead of 0x%x\n", RefId);
1642 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1645 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1646 ok(RefId == 0x3,
"RefId should be 0x3 instead of 0x%x\n", RefId);
1649 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1650 ok(RefId == 0x3,
"RefId should be 0x3 instead of 0x%x\n", RefId);
1653 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1656 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1659 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1660 ok(RefId == 0x4,
"RefId should be 0x4 instead of 0x%x\n", RefId);
1663 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1664 ok(RefId == 0x4,
"RefId should be 0x4 instead of 0x%x\n", RefId);
1667 ok(
ret == 1,
"ret should be 1 instead of 0x%x\n",
ret);
1668 ok(RefId == 0x4,
"RefId should be 0x4 instead of 0x%x\n", RefId);
1671 ok(
ret == 0,
"ret should be 0 instead of 0x%x\n",
ret);
1681 memset(&unset_ptr, 0xcc,
sizeof(unset_ptr));
1683#define TEST_ZERO(field, fmt) ok(stubMsg->field == 0, "%s: " #field " should have been set to zero instead of " fmt "\n", prefix, stubMsg->field)
1684#define TEST_POINTER_UNSET(field) ok(stubMsg->field == unset_ptr, "%s: " #field " should have been unset instead of %p\n", prefix, stubMsg->field)
1685#define TEST_ULONG_UNSET(field) ok(stubMsg->field == 0xcccccccc, "%s: " #field " should have been unset instead of 0x%x\n", prefix, stubMsg->field)
1686#define TEST_ULONG_PTR_UNSET(field) ok(stubMsg->field == (ULONG_PTR)unset_ptr, "%s: " #field " should have been unset instead of 0x%lx\n", prefix, stubMsg->field)
1694 "%s: pPointerQueueState should have been unset instead of %p\n",
1696 TEST_ZERO(IgnoreEmbeddedPointers,
"%d");
1700 "%s: uFlags should have been set to zero instead of 0x%x\n", prefix, stubMsg->
uFlags );
1705 ok(stubMsg->pfnAllocate ==
my_alloc,
"%s: pfnAllocate should have been %p instead of %p\n",
1706 prefix,
my_alloc, stubMsg->pfnAllocate);
1707 ok(stubMsg->pfnFree ==
my_free,
"%s: pfnFree should have been %p instead of %p\n",
1708 prefix,
my_free, stubMsg->pfnFree);
1718 "%s: pAsyncMsg should have been set to zero instead of %d\n", prefix, stubMsg->
PointerLength );
1722 "%s: fHasReturn should have been set to zero instead of %d\n", prefix, stubMsg->
fHasReturn );
1726 "%s: fIsIn should have been set to 0 instead of %d\n", prefix, stubMsg->
fIsIn);
1729 "%s: fBufferValid should have been set to 0 instead of %d\n", prefix, stubMsg->
fBufferValid);
1733 "%s: fUnused should have been set to 0 or -2 instead of %d\n", prefix, stubMsg->
fUnused);
1734 ok(stubMsg->
fUnused2 == 0xffffcccc,
"%s: fUnused2 should have been 0xffffcccc instead of 0x%x\n",
1737 "%s: dwDestContext should have been MSHCTX_DIFFERENTMACHINE instead of %d\n",
1752 "%s: pAsyncMsg should have been set to zero instead of %p\n", prefix, stubMsg->
pAsyncMsg );
1754 "%s: pCorrInfo should have been set to zero instead of %p\n", prefix, stubMsg->
pCorrInfo );
1756 "%s: pCorrMemory should have been set to zero instead of %p\n", prefix, stubMsg->
pCorrMemory );
1758 "%s: pMemoryList should have been set to zero instead of %p\n", prefix, stubMsg->
pMemoryList );
1762 ok(stubMsg->
Unused == (
ULONG_PTR)unset_ptr,
"%s: Unused should have be unset instead of 0x%lx\n",
1763 prefix, stubMsg->
Unused);
1771#undef TEST_ULONG_PTR_UNSET
1772#undef TEST_ULONG_UNSET
1773#undef TEST_POINTER_UNSET
1783 memset(&rpcMsg, 0xcc,
sizeof(rpcMsg));
1784 memset(&stubMsg, 0xcc,
sizeof(stubMsg));
1785 memset(&unset_ptr, 0xcc,
sizeof(unset_ptr));
1791 ok(stubMsg.
RpcMsg == &rpcMsg,
"stubMsg.RpcMsg should have been %p instead of %p\n", &rpcMsg, stubMsg.
RpcMsg);
1792 ok(rpcMsg.
Handle ==
NULL,
"rpcMsg.Handle should have been NULL instead of %p\n", rpcMsg.
Handle);
1793 ok(rpcMsg.
Buffer == unset_ptr,
"rpcMsg.Buffer should have been unset instead of %p\n",
1796 ok(rpcMsg.
ProcNum == 0x8001,
"rpcMsg.ProcNum should have been 0x8001 instead of 0x%x\n", rpcMsg.
ProcNum);
1799 "rpcMsg.RpcInterfaceInformation should have been %p instead of %p\n",
1802 ok(rpcMsg.
ManagerEpv == unset_ptr,
"rpcMsg.ManagerEpv should have been unset instead of %p\n", rpcMsg.
ManagerEpv);
1804 ok(rpcMsg.
RpcFlags == 0,
"rpcMsg.RpcFlags should have been 0 instead of 0x%x\n", rpcMsg.
RpcFlags);
1806 ok(stubMsg.
Buffer == unset_ptr,
"stubMsg.Buffer should have been unset instead of %p\n",
1808 ok(stubMsg.
BufferStart ==
NULL,
"stubMsg.BufferStart should have been NULL instead of %p\n",
1810 ok(stubMsg.
BufferEnd ==
NULL,
"stubMsg.BufferEnd should have been NULL instead of %p\n",
1812 ok(stubMsg.
BufferLength == 0,
"stubMsg.BufferLength should have been 0 instead of %u\n",
1814 ok(stubMsg.
IsClient == 1,
"stubMsg.IsClient should have been 1 instead of %u\n", stubMsg.
IsClient);
1815 ok(stubMsg.
ReuseBuffer == 0,
"stubMsg.ReuseBuffer should have been 0 instead of %d\n",
1817 ok(stubMsg.
CorrDespIncrement == 0,
"stubMsg.CorrDespIncrement should have been 0 instead of %d\n",
1819 ok(stubMsg.
FullPtrXlatTables == unset_ptr,
"stubMsg.FullPtrXlatTables should have been unset instead of %p\n",
1828 unsigned char buffer[256];
1830 memset(&rpcMsg, 0,
sizeof(rpcMsg));
1835 memset(&stubMsg, 0xcc,
sizeof(stubMsg));
1838 ok(
ret ==
NULL,
"NdrServerInitializeNew should have returned NULL instead of %p\n",
ret);
1842 ok(stubMsg.
RpcMsg == &rpcMsg,
"stubMsg.RpcMsg should have been %p instead of %p\n", &rpcMsg, stubMsg.
RpcMsg);
1848 ok(stubMsg.
IsClient == 0,
"stubMsg.IsClient should have been 0 instead of %u\n", stubMsg.
IsClient);
1851 "stubMsg.ReuseBuffer should have been set to zero instead of %d\n", stubMsg.
ReuseBuffer);
1854 "CorrDespIncrement should have been set to zero instead of 0x%x\n", stubMsg.
CorrDespIncrement);
1864 struct tag_mem_list_v2_t
1869 struct tag_mem_list_v2_t *
next;
1871 const DWORD magic_MEML =
'M' << 24 |
'E' << 16 |
'M' << 8 |
'L';
1884 if (mem_list_v2->size == 24)
1886 trace(
"v2 mem list format\n");
1887 ok((
char *)mem_list_v2 == (
char *)p2 + 24,
"expected mem_list_v2 pointer %p, but got %p\n", (
char *)p2 + 24, mem_list_v2);
1888 ok(mem_list_v2->magic == magic_MEML,
"magic %08x\n", mem_list_v2->magic);
1889 ok(mem_list_v2->size == 24,
"wrong size for p2 %d\n", mem_list_v2->size);
1890 ok(mem_list_v2->unknown == 0,
"wrong unknown for p2 0x%x\n", mem_list_v2->unknown);
1891 ok(mem_list_v2->next !=
NULL,
"next NULL\n");
1892 mem_list_v2 = mem_list_v2->next;
1895 ok((
char *)mem_list_v2 == (
char *)p1 + 16,
"expected mem_list_v2 pointer %p, but got %p\n", (
char *)p1 + 16, mem_list_v2);
1896 ok(mem_list_v2->magic == magic_MEML,
"magic %08x\n", mem_list_v2->magic);
1897 ok(mem_list_v2->size == 16,
"wrong size for p1 %d\n", mem_list_v2->size);
1898 ok(mem_list_v2->unknown == 0,
"wrong unknown for p1 0x%x\n", mem_list_v2->unknown);
1899 ok(mem_list_v2->next ==
NULL,
"next %p\n", mem_list_v2->
next);
1902 else win_skip(
"v1 mem list format\n");
1915 unsigned char *
mem, *mem_orig;
1916 unsigned char memsrc[20];
1919 static const unsigned char fmtstr_conf_array[] =
1931 for (
i = 0;
i <
sizeof(memsrc);
i++)
1946 fmtstr_conf_array );
1974 ok(
mem == mem_orig,
"mem alloced\n");
1981 ok(
mem != mem_orig,
"mem not alloced\n");
1989 StubMsg.pfnFree(
mem);
1998 "mem not pointing at buffer %p/%p\n",
mem, StubMsg.
BufferStart + 4);
2006 StubMsg.pfnFree(
mem);
2012 ok(
mem == mem_orig,
"mem alloced\n");
2021 StubMsg.pfnFree(
mem);
2022 StubMsg.pfnFree(mem_orig);
2034 unsigned char *
mem, *mem_orig;
2035 char memsrc[] =
"This is a test string";
2037 static const unsigned char fmtstr_conf_str[] =
2047 memset( &StubMsg, 0,
sizeof(StubMsg) );
2056 (
unsigned char *)memsrc,
2067 ok(
size ==
sizeof(memsrc) + 12,
"Buffer %p Start %p len %d\n",
2081 mem[
sizeof(memsrc) - 1] = 0;
2083 ok(
mem == mem_orig,
"mem not alloced\n");
2089 ok(
mem == mem_orig,
"mem not alloced\n");
2094 if (
mem != mem_orig)
2115 "mem not pointing at buffer %p/%p\n",
mem, StubMsg.
BufferStart + 12 );
2123 "mem not pointing at buffer %p/%p\n",
mem, StubMsg.
BufferStart + 12 );
2131 "mem not pointing at buffer %p/%p\n",
mem, StubMsg.
BufferStart + 12 );
2139 "mem not pointing at buffer %p/%p\n",
mem, StubMsg.
BufferStart + 12 );
2159 unsigned char *
mem, *mem_orig;
2160 unsigned char memsrc[10] =
"This is";
2161 unsigned char memsrc2[10] =
"This is a";
2163 static const unsigned char fmtstr_nonconf_str[] =
2192 ok(
size ==
strlen((
char *)memsrc) + 1 + 8,
"Buffer %p Start %p len %d\n",
2205 ok(
mem == mem_orig,
"mem alloced\n");
2212 ok(
mem == mem_orig,
"mem alloced\n");
2222 ok(
mem != mem_orig,
"mem not alloced\n");
2231 ok(
mem == mem_orig,
"mem alloced\n");
2239 ok(
mem == mem_orig,
"mem alloced\n");
2265 ok(
size ==
strlen((
char *)memsrc2) + 1 + 8,
"Buffer %p Start %p len %d\n",
2278 ok(
mem == mem_orig,
"mem alloced\n");
2285 ok(
mem == mem_orig,
"mem alloced\n");
2295 ok(
mem != mem_orig,
"mem not alloced\n");
2304 ok(
mem == mem_orig,
"mem alloced\n");
2312 ok(
mem == mem_orig,
"mem alloced\n");
2330 unsigned int *
array[1];
2332 struct conf_complex *memsrc;
2333 struct conf_complex *
mem;
2335 static const unsigned char fmtstr_complex_struct[] =
2389 (
unsigned char *)memsrc,
2390 &fmtstr_complex_struct[30] );
2398 &fmtstr_complex_struct[30] );
2400 ok(*(
unsigned int *)StubMsg.
BufferStart == 20,
"Conformance should have been 20 instead of %d\n", *(
unsigned int *)StubMsg.
BufferStart);
2401 ok(*(
unsigned int *)(StubMsg.
BufferStart + 4) == 20,
"conf_complex.size should have been 20 instead of %d\n", *(
unsigned int *)(StubMsg.
BufferStart + 4));
2402 for (
i = 0;
i < 20;
i++)
2403 ok(*(
unsigned int *)(StubMsg.
BufferStart + 8 +
i * 4) == 0,
"pointer id for conf_complex.array[%d] should have been 0 instead of 0x%x\n",
i, *(
unsigned int *)(StubMsg.
BufferStart + 8 +
i * 4));
2412 ok(
mem->size == 20,
"mem->size wasn't unmarshalled correctly (%d)\n",
mem->size);
2413 ok(
mem->array[0] ==
NULL,
"mem->array[0] wasn't unmarshalled correctly (%p)\n",
mem->array[0]);
2414 StubMsg.pfnFree(
mem);
2430 unsigned int dim1, dim2;
2433 struct conf_complex memsrc;
2434 struct conf_complex *
mem;
2437 static const unsigned char fmtstr_complex_array[] =
2501 for(
i = 0;
i < memsrc.dim1;
i++)
2504 for(
j = 0;
j < memsrc.dim2;
j++)
2505 memsrc.array[
i][
j] =
i * memsrc.dim2 +
j;
2521 (
unsigned char *)&memsrc,
2522 &fmtstr_complex_array[32] );
2525 (
unsigned char *)&memsrc,
2526 &fmtstr_complex_array[32] );
2529 expected_length = (4 + memsrc.dim1 * (2 + memsrc.dim2)) * 4;
2538 &fmtstr_complex_array[32] );
2541 &fmtstr_complex_array[32] );
2545 ok((
char*)StubMsg.
Buffer == (
char*)StubMsg.
BufferStart + expected_length,
"not at expected length\n");
2549 ok(*
buf == memsrc.dim1,
"dim1 should have been %d instead of %08x\n", memsrc.dim1, *
buf);
2551 ok(*
buf == memsrc.dim2,
"dim2 should have been %d instead of %08x\n", memsrc.dim2, *
buf);
2553 ok(*
buf != 0,
"pointer id should be non-zero\n");
2555 ok(*
buf == memsrc.dim1,
"Conformance should have been %d instead of %08x\n", memsrc.dim1, *
buf);
2557 for(
i = 0;
i < memsrc.dim1;
i++)
2559 ok(*
buf != 0,
"pointer id[%d] should be non-zero\n",
i);
2562 for(
i = 0;
i < memsrc.dim1;
i++)
2564 ok(*
buf == memsrc.dim2,
"Conformance should have been %d instead of %08x\n", memsrc.dim2, *
buf);
2566 for(
j = 0;
j < memsrc.dim2;
j++)
2568 ok(*
buf ==
i * memsrc.dim2 +
j,
"got %08x\n", *
buf);
2573 ok((
void*)
buf == StubMsg.
Buffer,
"not at end of buffer\n");
2586 ok(
mem->dim1 == memsrc.dim1,
"mem->dim1 wasn't unmarshalled correctly (%d)\n",
mem->dim1);
2587 ok(
mem->dim2 == memsrc.dim2,
"mem->dim2 wasn't unmarshalled correctly (%d)\n",
mem->dim2);
2588 ok(
mem->array[1][0] == memsrc.dim2,
"mem->array[1][0] wasn't unmarshalled correctly (%d)\n",
mem->array[1][0]);
2599 for(
i = 0;
i < memsrc.dim1;
i++)
2606 static unsigned char ncalrpc[] =
"ncalrpc";
2607 static unsigned char endpoint[] =
"winetest:test_ndr_buffer";
2612 unsigned char *binding;
2615 ULONG prev_buffer_length;
2616 BOOL old_buffer_valid_location;
2642 ok(
ret == StubMsg.
Buffer,
"NdrGetBuffer should have returned the same value as StubMsg.Buffer instead of %p\n",
ret);
2643 ok(RpcMessage.
Handle !=
NULL,
"RpcMessage.Handle should not have been NULL\n");
2644 ok(RpcMessage.
Buffer !=
NULL,
"RpcMessage.Buffer should not have been NULL\n");
2647 "RpcMessage.BufferLength should have been 10 instead of %d\n", RpcMessage.
BufferLength);
2648 ok(RpcMessage.
RpcFlags == 0,
"RpcMessage.RpcFlags should have been 0x0 instead of 0x%x\n", RpcMessage.
RpcFlags);
2649 ok(StubMsg.
Buffer !=
NULL,
"Buffer should not have been NULL\n");
2655 if (old_buffer_valid_location)
2663 ok(RpcMessage.
Handle !=
NULL,
"RpcMessage.Handle should not have been NULL\n");
2664 ok(RpcMessage.
Buffer !=
NULL,
"RpcMessage.Buffer should not have been NULL\n");
2665 ok(RpcMessage.
BufferLength == prev_buffer_length,
"RpcMessage.BufferLength should have been left as %d instead of %d\n", prev_buffer_length, RpcMessage.
BufferLength);
2666 ok(StubMsg.
Buffer !=
NULL,
"Buffer should not have been NULL\n");
2668 if (old_buffer_valid_location)
2690 for (rpc_status = 0; rpc_status < 10000; rpc_status++)
2693 ULONG comm_status = 0;
2694 ULONG fault_status = 0;
2695 ULONG expected_comm_status = 0;
2696 ULONG expected_fault_status = 0;
2713 expected_comm_status = rpc_status;
2716 expected_fault_status = rpc_status;
2718 ok(comm_status == expected_comm_status,
"NdrMapCommAndFaultStatus should have mapped %d to comm status %d instead of %d\n",
2719 rpc_status, expected_comm_status, comm_status);
2720 ok(fault_status == expected_fault_status,
"NdrMapCommAndFaultStatus should have mapped %d to fault status %d instead of %d\n",
2721 rpc_status, expected_fault_status, fault_status);
2731 unsigned char buffer[16];
2732 void *rpc_channel_buffer = (
void *)(
ULONG_PTR)0xcafebabe;
2741 memset(&stubmsg, 0xcc,
sizeof(stubmsg));
2753 memset(&umcb, 0xcc,
sizeof(umcb));
2759 memset(&umi, 0xaa,
sizeof(umi));
2764 "umi.InformationLevel was %u instead of 1\n",
2767 "umi.Level1.Buffer was %p instead of %p\n",
2769 ok(
U1(umi).Level1.BufferSize == 1,
2770 "umi.Level1.BufferSize was %u instead of 1\n",
2771 U1(umi).Level1.BufferSize);
2773 "umi.Level1.pfnAllocate was %p instead of %p\n",
2776 "umi.Level1.pfnFree was %p instead of %p\n",
2778 ok(
U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer,
2779 "umi.Level1.pRpcChannelBuffer was %p instead of %p\n",
2780 U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer);
2793 memset(&umi, 0xaa,
sizeof(umi));
2798 "umi.InformationLevel was %u instead of 1\n",
2801 "umi.Level1.Buffer was %p instead of NULL\n",
2802 U1(umi).Level1.Buffer);
2803 ok(
U1(umi).Level1.BufferSize == 0,
2804 "umi.Level1.BufferSize was %u instead of 0\n",
2805 U1(umi).Level1.BufferSize);
2807 "umi.Level1.pfnAllocate was %p instead of %p\n",
2810 "umi.Level1.pfnFree was %p instead of %p\n",
2812 ok(
U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer,
2813 "umi.Level1.pRpcChannelBuffer was %p instead of %p\n",
2814 U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer);
2827 memset(&umi, 0xaa,
sizeof(umi));
2832 "umi.InformationLevel was %u instead of 1\n",
2835 "umi.Level1.Buffer was %p instead of %p\n",
2837 ok(
U1(umi).Level1.BufferSize == 1,
2838 "umi.Level1.BufferSize was %u instead of 1\n",
2839 U1(umi).Level1.BufferSize);
2841 "umi.Level1.pfnAllocate was %p instead of %p\n",
2844 "umi.Level1.pfnFree was %p instead of %p\n",
2846 ok(
U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer,
2847 "umi.Level1.pRpcChannelBuffer was %p instead of %p\n",
2848 U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer);
2861 memset(&umi, 0xaa,
sizeof(umi));
2866 "umi.InformationLevel was %u instead of 1\n",
2869 "umi.Level1.Buffer was %p instead of NULL\n",
2870 U1(umi).Level1.Buffer);
2871 ok(
U1(umi).Level1.BufferSize == 0,
2872 "umi.Level1.BufferSize was %u instead of 0\n",
2873 U1(umi).Level1.BufferSize);
2875 "umi.Level1.pfnAllocate was %p instead of %p\n",
2878 "umi.Level1.pfnFree was %p instead of %p\n",
2880 ok(
U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer,
2881 "umi.Level1.pRpcChannelBuffer was %p instead of %p\n",
2882 U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer);
2897 ok(
U1(umi).Level1.BufferSize == 0,
2898 "umi.Level1.BufferSize was %u instead of 0\n",
2899 U1(umi).Level1.BufferSize);
2906 "NdrGetUserMarshalInfo should have failed with ERROR_INVALID_USER_BUFFER instead of %d\n",
status);
2911 "NdrGetUserMarshalInfo should have failed with RPC_S_INVALID_ARG instead of %d\n",
status);
2921 "NdrGetUserMarshalInfo should have failed with RPC_S_INVALID_ARG instead of %d\n",
status);
2940 buffer = (
void*)((0xdeadbeef + 7) & ~7);
2957 &
buffer, 32, &encoded_size);
2962 &
buffer, 32, &encoded_size);
2966 NULL, 32, &encoded_size);
2975 &
buffer, 32, &encoded_size);
2987 memset( &stub_msg, 0,
sizeof(stub_msg) );
2995 memset( &stub_msg, 0,
sizeof(stub_msg) );
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
ULONG WINAPI NdrSimpleStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrConformantArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrComplexStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrPointerFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrSimpleStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo(ULONG *flags, ULONG level, NDR_USER_MARSHAL_INFO *umi)
unsigned char *WINAPI NdrPointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
unsigned char *WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
void WINAPI NdrSimpleTypeUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, unsigned char FormatChar)
void WINAPI NdrSimpleStructFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrConformantArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrComplexStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrSimpleStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
unsigned char *WINAPI NdrNonConformantStringMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrNonConformantStringUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
void WINAPI NdrNonConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrComplexStructFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrConformantArrayFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrSimpleStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrConformantArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
ULONG WINAPI NdrPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
void *WINAPI NdrAllocate(MIDL_STUB_MESSAGE *pStubMsg, SIZE_T len)
void WINAPI NdrCorrelationInitialize(PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG Flags)
void WINAPI NdrSimpleTypeMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, unsigned char FormatChar)
void WINAPI NdrPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
@ MES_DYNAMIC_BUFFER_HANDLE
#define memcpy(s1, s2, n)
#define cmp(status, error)
#define TEST_POINTER_UNSET(field)
#define TEST_ULONG_PTR_UNSET(field)
static int deref_cmp(const void *s1, const void *s2, size_t num)
static IPersistVtbl testiface_vtbl
static void test_simple_struct(void)
static void test_conformant_string(void)
static void test_ndr_simple_type(void)
static void test_ndr_allocate(void)
static void test_NdrGetUserMarshalInfo(void)
static BOOL use_pointer_ids
static const MIDL_STUB_DESC Object_StubDesc
static struct testiface * impl_from_IPersist(IPersist *iface)
static void test_conf_complex_struct(void)
static void test_ndr_buffer(void)
static const RPC_SERVER_INTERFACE IFoo___RpcServerInterface
static void test_server_init(void)
static void test_nontrivial_pointer_types(void)
static void test_pointer_marshal(const unsigned char *formattypes, void *memsrc, DWORD srcsize, const void *wiredata, ULONG wiredatalen, int(*cmp)(const void *, const void *, size_t), int num_additional_allocs, const char *msgpfx)
static void test_MesEncodeFixedBufferHandleCreate(void)
static int my_free_called
#define TEST_ZERO(field, fmt)
static int ps1_cmp(const void *s1, const void *s2, size_t num)
static RPC_DISPATCH_FUNCTION IFoo_table[]
static void test_common_stub_data(const char *prefix, const MIDL_STUB_MESSAGE *stubMsg)
static void test_conformant_array(void)
static void test_nonconformant_string(void)
static void *CALLBACK my_alloc(SIZE_T size)
static void test_simple_struct_marshal(const unsigned char *formattypes, void *memsrc, DWORD srcsize, const void *wiredata, ULONG wiredatalen, int(*cmp)(const void *, const void *, size_t), int num_additional_allocs, const char *msgpfx)
static int my_alloc_called
static void test_client_init(void)
static ULONG WINAPI test_persist_Release(IPersist *iface)
static RPC_IF_HANDLE IFoo_v0_0_s_ifspec
static void test_struct_align(void)
static void CALLBACK my_free(void *ptr)
static void test_iface_ptr(void)
static void test_simple_types(void)
static HRESULT WINAPI test_persist_QueryInterface(IPersist *iface, REFIID iid, void **out)
static RPC_DISPATCH_TABLE IFoo_v0_0_DispatchTable
static HRESULT WINAPI test_persist_GetClassId(IPersist *iface, GUID *clsid)
static void test_NdrCorrelationInitialize(void)
static ULONG WINAPI test_persist_AddRef(IPersist *iface)
#define TEST_ULONG_UNSET(field)
static void determine_pointer_marshalling_style(void)
static void test_NdrMapCommAndFaultStatus(void)
static void test_fullpointer_xlat(void)
static void test_conf_complex_array(void)
unsigned __int3264 UINT_PTR
void WINAPI NdrClientInitializeNew(PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum)
unsigned char *WINAPI NdrServerInitializeNew(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc)
RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus(PMIDL_STUB_MESSAGE pStubMsg, ULONG *pCommStatus, ULONG *pFaultStatus, RPC_STATUS Status)
void WINAPI NdrFreeBuffer(PMIDL_STUB_MESSAGE pStubMsg)
unsigned char *WINAPI NdrGetBuffer(PMIDL_STUB_MESSAGE stubmsg, ULONG buflen, RPC_BINDING_HANDLE handle)
RPC_STATUS WINAPI MesHandleFree(handle_t Handle)
RPC_STATUS WINAPI MesBufferHandleReset(handle_t Handle, ULONG HandleStyle, MIDL_ES_CODE Operation, char **Buffer, ULONG BufferSize, ULONG *EncodedSize)
RPC_STATUS RPC_ENTRY MesEncodeFixedBufferHandleCreate(char *Buffer, ULONG BufferSize, ULONG *pEncodedSize, handle_t *pHandle)
int WINAPI NdrFullPointerFree(PFULL_PTR_XLAT_TABLES pXlatTables, void *Pointer)
int WINAPI NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId, unsigned char QueryType, void **ppPointer)
void WINAPI NdrFullPointerXlatFree(PFULL_PTR_XLAT_TABLES pXlatTables)
int WINAPI NdrFullPointerQueryPointer(PFULL_PTR_XLAT_TABLES pXlatTables, void *pPointer, unsigned char QueryType, ULONG *pRefId)
PFULL_PTR_XLAT_TABLES WINAPI NdrFullPointerXlatInit(ULONG NumberOfPointers, XLAT_SIDE XlatSide)
void WINAPI NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId, void *pPointer)
void *WINAPI NdrOleAllocate(SIZE_T Size)
unsigned char *WINAPI NdrInterfacePointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrInterfacePointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
void WINAPI NdrOleFree(void *NodeToFree)
void WINAPI NdrInterfacePointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrInterfacePointerFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
_In_ ULONG _In_ ULONG Offset
#define IsEqualGUID(rguid1, rguid2)
#define FC_ALLOCED_ON_STACK
static unsigned __int64 next
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
RPC_STATUS WINAPI RpcStringBindingComposeA(RPC_CSTR ObjUuid, RPC_CSTR Protseq, RPC_CSTR NetworkAddr, RPC_CSTR Endpoint, RPC_CSTR Options, RPC_CSTR *StringBinding)
RPC_STATUS WINAPI RpcBindingFromStringBindingA(RPC_CSTR StringBinding, RPC_BINDING_HANDLE *Binding)
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
RPC_STATUS WINAPI RpcServerUseProtseqEpA(RPC_CSTR Protseq, UINT MaxCalls, RPC_CSTR Endpoint, LPVOID SecurityDescriptor)
RPC_STATUS WINAPI RpcServerUnregisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, UINT WaitForCallsToComplete)
void(__RPC_STUB * RPC_DISPATCH_FUNCTION)(PRPC_MESSAGE Message)
#define RPC_BUFFER_COMPLETE
struct _RPC_SERVER_INTERFACE RPC_SERVER_INTERFACE
#define NDR_LOCAL_DATA_REPRESENTATION
@ USER_MARSHAL_CB_BUFFER_SIZE
@ USER_MARSHAL_CB_UNMARSHALL
@ USER_MARSHAL_CB_MARSHALL
#define USER_MARSHAL_CB_SIGNATURE
#define RPC_S_INVALID_ARG
#define RPC_X_INVALID_BUFFER
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR *String)
static __inline const char * wine_dbgstr_guid(const GUID *id)
void * RpcInterfaceInformation
const unsigned char * pFormatTypes
PNDR_CORRELATION_INFO pCorrInfo
unsigned char CorrDespIncrement
unsigned int fBufferValid
struct NDR_POINTER_QUEUE_STATE * pPointerQueueState
struct IRpcChannelBuffer * pRpcChannelBuffer
PNDR_ASYNC_MESSAGE pAsyncMsg
struct _FULL_PTR_XLAT_TABLES * FullPtrXlatTables
unsigned char * BufferEnd
unsigned char * pCorrMemory
const struct _MIDL_STUB_DESC * StubDesc
unsigned char * BufferStart
unsigned int BufferLength
PRPC_SYNTAX_IDENTIFIER TransferSyntax
void * RpcInterfaceInformation
RPC_BINDING_HANDLE Handle
USER_MARSHAL_CB_TYPE CBType
PMIDL_STUB_MESSAGE pStubMsg
static CONST DWORD MemorySize[]
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
#define RPC_S_SERVER_TOO_BUSY
#define RPC_S_CALL_FAILED_DNE
#define EPT_S_NOT_REGISTERED
#define RPC_S_UNSUPPORTED_TRANS_SYN
#define ERROR_INVALID_USER_BUFFER
#define RPC_S_UNSUPPORTED_TYPE
#define RPC_S_PROTOCOL_ERROR
#define RPC_S_SERVER_UNAVAILABLE
#define RPC_S_INVALID_BINDING
#define RPC_S_COMM_FAILURE
#define RPC_S_PROCNUM_OUT_OF_RANGE