49# define LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32) \
50 (*((UINT32 *)(pchar)) = (uint32))
52# define LITTLE_ENDIAN_UINT32_READ(pchar) \
53 (*((UINT32 *)(pchar)))
56# define LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32) \
57 (*(pchar) = LOBYTE(LOWORD(uint32)), \
58 *((pchar)+1) = HIBYTE(LOWORD(uint32)), \
59 *((pchar)+2) = LOBYTE(HIWORD(uint32)), \
60 *((pchar)+3) = HIBYTE(HIWORD(uint32)))
62# define LITTLE_ENDIAN_UINT32_READ(pchar) \
64 MAKEWORD(*(pchar), *((pchar)+1)), \
65 MAKEWORD(*((pchar)+2), *((pchar)+3))))
68#define BIG_ENDIAN_UINT32_WRITE(pchar, uint32) \
69 (*((pchar)+3) = LOBYTE(LOWORD(uint32)), \
70 *((pchar)+2) = HIBYTE(LOWORD(uint32)), \
71 *((pchar)+1) = LOBYTE(HIWORD(uint32)), \
72 *(pchar) = HIBYTE(HIWORD(uint32)))
74#define BIG_ENDIAN_UINT32_READ(pchar) \
76 MAKEWORD(*((pchar)+3), *((pchar)+2)), \
77 MAKEWORD(*((pchar)+1), *(pchar))))
79#ifdef NDR_LOCAL_IS_BIG_ENDIAN
80# define NDR_LOCAL_UINT32_WRITE(pchar, uint32) \
81 BIG_ENDIAN_UINT32_WRITE(pchar, uint32)
82# define NDR_LOCAL_UINT32_READ(pchar) \
83 BIG_ENDIAN_UINT32_READ(pchar)
85# define NDR_LOCAL_UINT32_WRITE(pchar, uint32) \
86 LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32)
87# define NDR_LOCAL_UINT32_READ(pchar) \
88 LITTLE_ENDIAN_UINT32_READ(pchar)
122#define STD_OVERFLOW_CHECK(_Msg) do { \
123 TRACE("buffer=%Id/%ld\n", _Msg->Buffer - (unsigned char *)_Msg->RpcMsg->Buffer, _Msg->BufferLength); \
124 if (_Msg->Buffer > (unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength) \
125 ERR("buffer overflow %Id bytes\n", _Msg->Buffer - ((unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength)); \
128#define NDR_POINTER_ID_BASE 0x20000
129#define NDR_POINTER_ID(pStubMsg) (NDR_POINTER_ID_BASE + ((pStubMsg)->UniquePtrCount++) * 4)
130#define NDR_TABLE_SIZE 128
131#define NDR_TABLE_MASK 127
162 unsigned char fMustAlloc);
399#define MEML_MAGIC ('M' << 24 | 'E' << 16 | 'M' << 8 | 'L')
425 aligned_len = (
len + 7) & ~7;
428 if (adjusted_len <
len)
430 ERR(
"overflow of adjusted_len %Id, len %Id\n", adjusted_len,
len);
434 p = pStubMsg->pfnAllocate(adjusted_len);
439 mem_list->
size = aligned_len;
457 TRACE(
"(%p, %p)\n", pStubMsg, Pointer);
459 pStubMsg->pfnFree(Pointer);
464 return (*(
const ULONG *)pFormat != -1);
479 TRACE(
"unmarshalled conformance is %Id\n", pStubMsg->
MaxCount);
505 ERR(
"invalid array bound(s): ActualCount = %ld, Offset = %ld, MaxValue = %ld\n",
559 BYTE dtype = pFormat[0] & 0xf;
560 short ofs = *(
const short *)&pFormat[2];
570 switch (pFormat[0] & 0xf0) {
572 TRACE(
"normal conformance, ofs=%d\n", ofs);
576 TRACE(
"pointer conformance, ofs=%d\n", ofs);
580 TRACE(
"toplevel conformance, ofs=%d\n", ofs);
591 TRACE(
"constant conformance, val=%Id\n",
data);
595 FIXME(
"toplevel multidimensional conformance, ofs=%d\n", ofs);
605 FIXME(
"unknown conformance type %x, expect crash.\n", pFormat[0] & 0xf0);
609 switch (pFormat[1]) {
615 unsigned char *old_stack_top = pStubMsg->
StackTop;
621 TRACE(
"callback conformance into apfnExprEval[%d]\n", ofs);
622 pStubMsg->
StubDesc->apfnExprEval[ofs](pStubMsg);
660 FIXME(
"unknown conformance data type %x\n", dtype);
663 TRACE(
"dereferenced data type %x at %p, got %Id\n", dtype,
ptr,
data);
666 switch (pFormat[1]) {
684 FIXME(
"unknown conformance op %d\n", pFormat[1]);
689 TRACE(
"resulting conformance is %Id\n", *pCount);
704 if (
ret > 0xffffffff)
724 ERR(
"buffer length overflow - BufferLength = %lu, size = %lu\n",
738 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p, size = %lu\n",
743 ERR(
"pointer is the same as the buffer\n");
754 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p, size = %lu\n",
773 ERR(
"bufsize 0x%lx exceeded buffer end %p of buffer %p\n",
bufsize,
781 ERR(
"invalid string length of %ld\n",
bufsize / esize);
788 ERR(
"string not null-terminated at byte position %ld, data is 0x%x\n",
797 TRACE(
" FC_ALLOCATE_ALL_NODES");
799 TRACE(
" FC_DONT_FREE");
801 TRACE(
" FC_ALLOCED_ON_STACK");
803 TRACE(
" FC_SIMPLE_POINTER");
805 TRACE(
" FC_POINTER_DEREF");
814 unsigned char *Pointer,
817 unsigned type = pFormat[0],
attr = pFormat[1];
821 BOOL pointer_needs_marshaling;
823 TRACE(
"(%p,%p,%p,%p)\n", pStubMsg,
Buffer, Pointer, pFormat);
827 else desc = pFormat + *(
const SHORT*)pFormat;
833 ERR(
"NULL ref pointer is not allowed\n");
836 pointer_needs_marshaling =
TRUE;
841 pointer_needs_marshaling =
TRUE;
843 pointer_needs_marshaling =
FALSE;
845 TRACE(
"writing 0x%08lx to buffer\n", pointer_id);
851 TRACE(
"writing 0x%08lx to buffer\n", pointer_id);
855 FIXME(
"unhandled ptr type=%02x\n",
type);
860 TRACE(
"calling marshaller for type 0x%x\n", (
int)*
desc);
862 if (pointer_needs_marshaling) {
864 Pointer = *(
unsigned char**)Pointer;
865 TRACE(
"deref => %p\n", Pointer);
868 if (
m)
m(pStubMsg, Pointer,
desc);
869 else FIXME(
"no marshaller for data type=%02x\n", *
desc);
884 unsigned char **pPointer,
885 unsigned char *pSrcPointer,
887 unsigned char fMustAlloc)
889 unsigned type = pFormat[0],
attr = pFormat[1];
892 DWORD pointer_id = 0;
893 BOOL pointer_needs_unmarshaling, need_alloc =
FALSE, inner_must_alloc =
FALSE;
895 TRACE(
"(%p,%p,%p,%p,%p,%d)\n", pStubMsg,
Buffer, pPointer, pSrcPointer, pFormat, fMustAlloc);
899 else desc = pFormat + *(
const SHORT*)pFormat;
903 pointer_needs_unmarshaling =
TRUE;
907 TRACE(
"pointer_id is 0x%08lx\n", pointer_id);
909 pointer_needs_unmarshaling =
TRUE;
912 pointer_needs_unmarshaling =
FALSE;
917 TRACE(
"pointer_id is 0x%08lx\n", pointer_id);
921 inner_must_alloc =
TRUE;
924 FIXME(
"free object pointer %p\n", pSrcPointer);
926 pointer_needs_unmarshaling =
TRUE;
930 pointer_needs_unmarshaling =
FALSE;
935 TRACE(
"pointer_id is 0x%08lx\n", pointer_id);
940 FIXME(
"unhandled ptr type=%02x\n",
type);
945 if (pointer_needs_unmarshaling) {
946 unsigned char **current_ptr = pPointer;
955 TRACE(
"setting *pPointer to %p\n", pSrcPointer);
956 *pPointer = pSrcPointer;
959 need_alloc = inner_must_alloc =
TRUE;
971 *pPointer = pSrcPointer;
980 FIXME(
"FC_ALLOCATE_ALL_NODES not implemented\n");
986 current_ptr = *(
unsigned char***)current_ptr;
987 TRACE(
"deref => %p\n", current_ptr);
990 if (
m)
m(pStubMsg, current_ptr,
desc, inner_must_alloc);
991 else FIXME(
"no unmarshaller for data type=%02x\n", *
desc);
998 TRACE(
"pointer=%p\n", *pPointer);
1005 unsigned char *Pointer,
1008 unsigned type = pFormat[0],
attr = pFormat[1];
1011 BOOL pointer_needs_sizing;
1014 TRACE(
"(%p,%p,%p)\n", pStubMsg, Pointer, pFormat);
1018 else desc = pFormat + *(
const SHORT*)pFormat;
1024 ERR(
"NULL ref pointer is not allowed\n");
1037 if (!pointer_needs_sizing)
1041 FIXME(
"unhandled ptr type=%02x\n",
type);
1047 Pointer = *(
unsigned char**)Pointer;
1048 TRACE(
"deref => %p\n", Pointer);
1052 if (
m)
m(pStubMsg, Pointer,
desc);
1053 else FIXME(
"no buffersizer for data type=%02x\n", *
desc);
1062 unsigned type = pFormat[0],
attr = pFormat[1];
1065 DWORD pointer_id = 0;
1066 BOOL pointer_needs_sizing;
1072 else desc = pFormat + *(
const SHORT*)pFormat;
1076 pointer_needs_sizing =
TRUE;
1081 TRACE(
"pointer_id is 0x%08lx\n", pointer_id);
1083 pointer_needs_sizing =
TRUE;
1085 pointer_needs_sizing =
FALSE;
1091 TRACE(
"pointer_id is 0x%08lx\n", pointer_id);
1097 FIXME(
"unhandled ptr type=%02x\n",
type);
1108 if (pointer_needs_sizing) {
1110 if (
m)
m(pStubMsg,
desc);
1111 else FIXME(
"no memorysizer for data type=%02x\n", *
desc);
1121 unsigned char *Pointer,
1124 unsigned type = pFormat[0],
attr = pFormat[1];
1127 unsigned char *current_pointer = Pointer;
1129 TRACE(
"(%p,%p,%p)\n", pStubMsg, Pointer, pFormat);
1134 else desc = pFormat + *(
const SHORT*)pFormat;
1136 if (!Pointer)
return;
1141 if (!pointer_needs_freeing)
1146 current_pointer = *(
unsigned char**)Pointer;
1147 TRACE(
"deref => %p\n", current_pointer);
1151 if (
m)
m(pStubMsg, current_pointer,
desc);
1163 TRACE(
"not freeing stack ptr %p\n", Pointer);
1166 TRACE(
"freeing %p\n", Pointer);
1170 TRACE(
"not freeing %p\n", Pointer);
1183 unsigned char *saved_buffer =
NULL;
1192 saved_buffer = pStubMsg->
Buffer;
1197 while (pFormat[0] !=
FC_END) {
1198 switch (pFormat[0]) {
1200 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1209 rep = *(
const WORD*)&pFormat[2];
1221 for (
i = 0;
i < rep;
i++) {
1228 unsigned char *memptr = membase + *(
const SHORT*)&
info[0];
1230 unsigned char *saved_memory = pStubMsg->
Memory;
1232 pStubMsg->
Memory = membase;
1234 pStubMsg->
Memory = saved_memory;
1237 pFormat += 8 *
count;
1243 pStubMsg->
Buffer = saved_buffer;
1260 unsigned char *pDstBuffer,
1261 unsigned char *pSrcMemoryPtrs,
1263 unsigned char fMustAlloc)
1268 unsigned char *saved_buffer =
NULL;
1270 TRACE(
"(%p,%p,%p,%p,%d)\n", pStubMsg, pDstBuffer, pSrcMemoryPtrs, pFormat, fMustAlloc);
1277 saved_buffer = pStubMsg->
Buffer;
1282 while (pFormat[0] !=
FC_END) {
1283 TRACE(
"pFormat[0] = 0x%x\n", pFormat[0]);
1284 switch (pFormat[0]) {
1286 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1295 rep = *(
const WORD*)&pFormat[2];
1307 for (
i = 0;
i < rep;
i++) {
1309 unsigned char *bufdstbase = pDstBuffer + (
i *
stride);
1310 unsigned char *memsrcbase = pSrcMemoryPtrs + (
i *
stride);
1315 unsigned char **bufdstptr = (
unsigned char **)(bufdstbase + *(
const SHORT*)&
info[2]);
1316 unsigned char **memsrcptr = (
unsigned char **)(memsrcbase + *(
const SHORT*)&
info[0]);
1321 pFormat += 8 *
count;
1327 pStubMsg->
Buffer = saved_buffer;
1342 ULONG saved_buffer_length = 0;
1348 if (*pFormat !=
FC_PP)
return;
1358 while (pFormat[0] !=
FC_END) {
1359 switch (pFormat[0]) {
1361 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1370 rep = *(
const WORD*)&pFormat[2];
1382 for (
i = 0;
i < rep;
i++) {
1388 unsigned char *memptr = membase + *(
const SHORT*)&
info[0];
1389 unsigned char *saved_memory = pStubMsg->
Memory;
1391 pStubMsg->
Memory = membase;
1393 pStubMsg->
Memory = saved_memory;
1396 pFormat += 8 *
count;
1399 if (saved_buffer_length)
1415 unsigned char *saved_buffer =
NULL;
1417 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
1423 saved_buffer = pStubMsg->
Buffer;
1428 if (*pFormat !=
FC_PP)
return 0;
1431 while (pFormat[0] !=
FC_END) {
1432 switch (pFormat[0]) {
1434 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1443 rep = *(
const WORD*)&pFormat[2];
1455 for (
i = 0;
i < rep;
i++) {
1464 pFormat += 8 *
count;
1470 pStubMsg->
Buffer = saved_buffer;
1487 if (*pFormat !=
FC_PP)
return;
1490 while (pFormat[0] !=
FC_END) {
1491 switch (pFormat[0]) {
1493 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1502 rep = *(
const WORD*)&pFormat[2];
1514 for (
i = 0;
i < rep;
i++) {
1520 unsigned char *memptr = membase + *(
const SHORT*)&
info[0];
1521 unsigned char *saved_memory = pStubMsg->
Memory;
1523 pStubMsg->
Memory = membase;
1525 pStubMsg->
Memory = saved_memory;
1528 pFormat += 8 *
count;
1546 if (*pFormat !=
FC_RP)
1564 unsigned char **ppMemory,
1566 unsigned char fMustAlloc)
1570 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
1572 if (*pFormat ==
FC_RP)
1578 if (pStubMsg->
IsClient && !*ppMemory)
1580 ERR(
"NULL ref pointer is not allowed\n");
1612 if (*pFormat !=
FC_RP)
1628 if (*pFormat !=
FC_RP)
1652 unsigned char FormatChar )
1667 unsigned char FormatChar )
1669#define BASE_TYPE_UNMARSHALL(type) \
1670 align_pointer(&pStubMsg->Buffer, sizeof(type)); \
1671 TRACE("pMemory: %p\n", pMemory); \
1672 *(type *)pMemory = *(type *)pStubMsg->Buffer; \
1673 pStubMsg->Buffer += sizeof(type);
1734 FIXME(
"Unhandled base type: 0x%02x\n", FormatChar);
1736#undef BASE_TYPE_UNMARSHALL
1746 unsigned size = *(
const WORD*)(pFormat+2);
1764 unsigned char **ppMemory,
1766 unsigned char fMustAlloc)
1768 unsigned size = *(
const WORD*)(pFormat+2);
1769 unsigned char *saved_buffer;
1770 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
1778 if (!pStubMsg->
IsClient && !*ppMemory)
1780 *ppMemory = pStubMsg->
Buffer;
1788 TRACE(
"copying %p to %p\n", saved_buffer, *ppMemory);
1789 if (*ppMemory != saved_buffer)
1802 unsigned size = *(
const WORD*)(pFormat+2);
1818 unsigned short size = *(
const WORD *)(pFormat+2);
1820 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
1890 ERR(
"unknown array format 0x%x\n",
fc);
1906 esize = *(
const WORD*)(pFormat+2);
1921 esize = *(
const WORD*)(pFormat+2);
1962 ERR(
"unknown array format 0x%x\n",
fc);
1972 BOOL conformance_present;
2005 def = *(
const WORD *)(pFormat + 2);
2013 ERR(
"unknown array format 0x%x\n",
fc);
2029 esize = *(
const WORD*)(pFormat+2);
2045 esize = *(
const WORD*)(pFormat+2);
2089 ERR(
"unknown array format 0x%x\n",
fc);
2102 esize = *(
const WORD*)(pFormat+2);
2106 esize = *(
const WORD*)(pFormat+2);
2122 def = *(
const WORD *)(pFormat + 2);
2135 ERR(
"unknown array format 0x%x\n",
fc);
2143 unsigned char fUseBufferMemoryServer,
unsigned char fUnmarshall)
2148 unsigned char *saved_buffer, *
pMemory;
2154 esize = *(
const WORD*)(pFormat+2);
2169 if (fUseBufferMemoryServer && !pStubMsg->
IsClient && !*ppMemory)
2171 *ppMemory = pStubMsg->
Buffer;
2174 saved_buffer = pStubMsg->
Buffer;
2180 TRACE(
"copying %p to %p\n", saved_buffer, *ppMemory);
2181 if (*ppMemory != saved_buffer)
2186 esize = *(
const WORD*)(pFormat+2);
2202 if (!fMustAlloc && !*ppMemory)
2206 saved_buffer = pStubMsg->
Buffer;
2227 ERR(
"buffer size %ld must equal memory size %Id for non-sized conformant strings\n",
2233 ERR(
"conformant strings can't have Offset (%ld)\n", pStubMsg->
Offset);
2248 if (fUseBufferMemoryServer && !pStubMsg->
IsClient &&
2252 *ppMemory = pStubMsg->
Buffer;
2253 else if (!*ppMemory)
2257 if (*ppMemory == pStubMsg->
Buffer)
2279 if (!fMustAlloc && !*ppMemory)
2285 saved_buffer = pStubMsg->
Buffer;
2291 return pStubMsg->
Buffer - saved_buffer;
2294 ERR(
"unknown array format 0x%x\n",
fc);
2301 unsigned char fHasPointers)
2311 esize = *(
const WORD*)(pFormat+2);
2328 esize = *(
const WORD*)(pFormat+2);
2358 ERR(
"buffer size %ld must equal memory size %Id for non-sized conformant strings\n",
2364 ERR(
"conformant strings can't have Offset (%ld)\n", pStubMsg->
Offset);
2392 pStubMsg->
MemorySize = SavedMemorySize + memsize;
2395 ERR(
"unknown array format 0x%x\n",
fc);
2433 ERR(
"unknown array format 0x%x\n",
fc);
2461 TRACE(
"(pStubMsg == ^%p, pszMessage == ^%p, pFormat == ^%p)\n", pStubMsg, pszMessage, pFormat);
2464 ERR(
"Unhandled string type: %#x\n", pFormat[0]);
2491 TRACE(
"(pStubMsg == ^%p, pMemory == ^%p, pFormat == ^%p)\n", pStubMsg,
pMemory, pFormat);
2494 ERR(
"Unhandled string type: %#x\n", pFormat[0]);
2519 TRACE(
"(pStubMsg == ^%p, pFormat == ^%p)\n", pStubMsg, pFormat);
2522 ERR(
"Unhandled string type: %#x\n", pFormat[0]);
2545 unsigned char** ppMemory,
PFORMAT_STRING pFormat,
unsigned char fMustAlloc )
2547 TRACE(
"(pStubMsg == ^%p, *pMemory == ^%p, pFormat == ^%p, fMustAlloc == %u)\n",
2548 pStubMsg, *ppMemory, pFormat, fMustAlloc);
2551 ERR(
"Unhandled string type: %#x\n", *pFormat);
2560 pFormat, fMustAlloc,
2566 pFormat, fMustAlloc,
2583 TRACE(
"(pStubMsg == ^%p, pMemory == ^%p, pFormat == ^%p)\n", pStubMsg,
pMemory, pFormat);
2607 ERR(
"Unhandled string type: %#x\n", *pFormat);
2624 unsigned char **ppMemory,
2626 unsigned char fMustAlloc)
2630 TRACE(
"(pStubMsg == ^%p, *pMemory == ^%p, pFormat == ^%p, fMustAlloc == %u)\n",
2631 pStubMsg, *ppMemory, pFormat, fMustAlloc);
2638 ERR(
"non-conformant strings can't have Offset (%ld)\n", pStubMsg->
Offset);
2646 ERR(
"Unhandled string type: %#x\n", *pFormat);
2655 if (!fMustAlloc && !*ppMemory)
2681 TRACE(
"(pStubMsg == ^%p, pMemory == ^%p, pFormat == ^%p)\n", pStubMsg,
pMemory, pFormat);
2707 ERR(
"Unhandled string type: %#x\n", *pFormat);
2722 TRACE(
"(pStubMsg == ^%p, pFormat == ^%p)\n", pStubMsg, pFormat);
2730 ERR(
"non-conformant strings can't have Offset (%ld)\n", pStubMsg->
Offset);
2738 ERR(
"Unhandled string type: %#x\n", *pFormat);
2755#include "pshpack1.h"
2776 return *(
const WORD*)&pFormat[2];
2779 return *(
const ULONG*)&pFormat[2];
2781 return *(
const WORD*)&pFormat[4];
2783 switch (((
const NDR_RANGE *)pFormat)->flags_type & 0xf) {
2788 return sizeof(
UCHAR);
2796 return sizeof(
ULONG);
2798 return sizeof(
float);
2804 return sizeof(
UINT);
2806 ERR(
"unknown type 0x%x\n", ((
const NDR_RANGE *)pFormat)->flags_type & 0xf);
2813 pFormat += *(
const SHORT*)pFormat;
2814 return *(
const SHORT*)pFormat;
2816 return sizeof(
void *);
2818 return *(
const WORD*)&pFormat[2] * 2;
2820 FIXME(
"unhandled embedded type %02x\n", *pFormat);
2833 FIXME(
"no memorysizer for data type=%02x\n", *pFormat);
2837 return m(pStubMsg, pFormat);
2846 unsigned char *mem_base =
pMemory;
2851 while (*pFormat !=
FC_END) {
2915 unsigned char *saved_buffer;
2918 TRACE(
"pStubMsg->Buffer before %p\n", pStubMsg->
Buffer);
2921 if (*pPointer !=
FC_RP)
2923 saved_buffer = pStubMsg->
Buffer;
2928 pointer_buffer_mark_set =
TRUE;
2930 else if (*pPointer !=
FC_RP)
2933 if (pointer_buffer_mark_set)
2937 pStubMsg->
Buffer = saved_buffer;
2938 if (*pPointer !=
FC_RP)
2941 TRACE(
"pStubMsg->Buffer after %p\n", pStubMsg->
Buffer);
2970 desc = pFormat + *(
const SHORT*)pFormat;
2985 else FIXME(
"no marshaller for embedded type %02x\n", *
desc);
2992 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3004 unsigned char fMustAlloc)
3006 unsigned char *mem_base =
pMemory;
3011 while (*pFormat !=
FC_END) {
3085 unsigned char *saved_buffer;
3090 if (*pPointer !=
FC_RP)
3092 saved_buffer = pStubMsg->
Buffer;
3097 pointer_buffer_mark_set =
TRUE;
3099 else if (*pPointer !=
FC_RP)
3103 if (pointer_buffer_mark_set)
3107 pStubMsg->
Buffer = saved_buffer;
3108 if (*pPointer !=
FC_RP)
3140 desc = pFormat + *(
const SHORT*)pFormat;
3162 else FIXME(
"no unmarshaller for embedded type %02x\n", *
desc);
3169 FIXME(
"unhandled format %d\n", *pFormat);
3182 unsigned char *mem_base =
pMemory;
3187 while (*pFormat !=
FC_END) {
3236 ERR(
"BufferLength == 0??\n");
3241 if (*pPointer !=
FC_RP)
3273 desc = pFormat + *(
const SHORT*)pFormat;
3287 else FIXME(
"no buffersizer for embedded type %02x\n", *
desc);
3294 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3307 unsigned char *mem_base =
pMemory;
3312 while (*pFormat !=
FC_END) {
3375 desc = pFormat + *(
const SHORT*)pFormat;
3395 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3410 while (*pFormat !=
FC_END) {
3452 unsigned char *saved_buffer;
3456 if (*pPointer !=
FC_RP)
3458 saved_buffer = pStubMsg->
Buffer;
3463 pointer_buffer_mark_set =
TRUE;
3465 else if (*pPointer !=
FC_RP)
3470 if (pointer_buffer_mark_set)
3474 pStubMsg->
Buffer = saved_buffer;
3475 if (*pPointer !=
FC_RP)
3482 size +=
sizeof(
void *);
3506 desc = pFormat + *(
const SHORT*)pFormat;
3513 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3526 while (*pFormat !=
FC_END) {
3559 size +=
sizeof(
void *);
3584 desc = pFormat + *(
const SHORT*)pFormat;
3591 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3608 unsigned char *OldMemory = pStubMsg->
Memory;
3632 pointer_buffer_mark_set =
TRUE;
3641 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3643 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3652 pMemory + struct_size, conf_array);
3670 pStubMsg->
Memory = OldMemory;
3672 if (pointer_buffer_mark_set)
3687 unsigned char **ppMemory,
3689 unsigned char fMustAlloc)
3691 unsigned size = *(
const WORD*)(pFormat+2);
3701 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
3707 unsigned char *saved_buffer = pStubMsg->
Buffer;
3718 pointer_buffer_mark_set =
TRUE;
3721 pStubMsg->
Buffer = saved_buffer;
3727 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3729 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3743 if (!fMustAlloc && !*ppMemory)
3763 if (pointer_buffer_mark_set)
3781 unsigned char *OldMemory = pStubMsg->
Memory;
3782 int pointer_length_set = 0;
3804 pointer_length_set = 1;
3812 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3814 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3842 pStubMsg->
Memory = OldMemory;
3844 if(pointer_length_set)
3858 unsigned size = *(
const WORD*)(pFormat+2);
3865 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
3870 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3872 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3909 unsigned char *OldMemory = pStubMsg->
Memory;
3914 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3916 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3927 pStubMsg->
Memory = OldMemory;
3940 ERR(
"invalid format = 0x%x\n", pFormat[0]);
3956 unsigned char **ppMemory,
3958 unsigned char fMustAlloc)
3960 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
3963 ERR(
"invalid format = 0x%x\n", pFormat[0]);
3986 ERR(
"invalid format = 0x%x\n", pFormat[0]);
4001 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
4004 ERR(
"invalid format = 0x%x\n", pFormat[0]);
4024 ERR(
"invalid format = 0x%x\n", pFormat[0]);
4044 ERR(
"invalid format type %x\n", pFormat[0]);
4062 unsigned char** ppMemory,
4064 unsigned char fMustAlloc )
4066 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4070 ERR(
"invalid format type %x\n", pFormat[0]);
4077 pFormat, fMustAlloc,
4096 ERR(
"invalid format type %x\n", pFormat[0]);
4116 ERR(
"invalid format type %x\n", pFormat[0]);
4134 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
4138 ERR(
"invalid format type %x\n", pFormat[0]);
4164 ERR(
"invalid format type %x\n", pFormat[0]);
4189 pointer_buffer_mark_set =
TRUE;
4193 pStubMsg->
Offset = saved_offset;
4194 pStubMsg->
MaxCount = saved_max_count;
4204 if (pointer_buffer_mark_set)
4217 unsigned char **ppMemory,
4219 unsigned char fMustAlloc)
4221 unsigned char *saved_buffer;
4223 int saved_ignore_embedded;
4225 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4229 ERR(
"invalid format type %x\n", pFormat[0]);
4236 saved_buffer = pStubMsg->
Buffer;
4244 TRACE(
"difference = 0x%Ix\n", pStubMsg->
Buffer - saved_buffer);
4249 pointer_buffer_mark_set =
TRUE;
4252 pStubMsg->
Buffer = saved_buffer;
4258 if (pointer_buffer_mark_set)
4274 int pointer_length_set = 0;
4280 ERR(
"invalid format type %x\n", pFormat[0]);
4303 pointer_length_set = 1;
4307 pStubMsg->
Offset = saved_offset;
4308 pStubMsg->
MaxCount = saved_max_count;
4315 if(pointer_length_set)
4328 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
4332 ERR(
"invalid format type %x\n", pFormat[0]);
4355 ERR(
"invalid format type %x\n", pFormat[0]);
4360 def = *(
const WORD*)&pFormat[2];
4388#define USER_MARSHAL_PTR_PREFIX \
4389 ( (DWORD)'U' | ( (DWORD)'s' << 8 ) | \
4390 ( (DWORD)'e' << 16 ) | ( (DWORD)'r' << 24 ) )
4399 unsigned flags = pFormat[1];
4400 unsigned index = *(
const WORD*)&pFormat[2];
4401 unsigned char *saved_buffer =
NULL;
4416 saved_buffer = pStubMsg->
Buffer;
4426 pStubMsg->
StubDesc->aUserMarshalQuadruple[
index].pfnMarshall(
4433 pStubMsg->
Buffer = saved_buffer;
4445 unsigned char **ppMemory,
4447 unsigned char fMustAlloc)
4449 unsigned flags = pFormat[1];
4450 unsigned index = *(
const WORD*)&pFormat[2];
4451 DWORD memsize = *(
const WORD*)&pFormat[4];
4452 unsigned char *saved_buffer =
NULL;
4455 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4467 saved_buffer = pStubMsg->
Buffer;
4476 if (!fMustAlloc && !*ppMemory)
4481 memset(*ppMemory, 0, memsize);
4485 pStubMsg->
StubDesc->aUserMarshalQuadruple[
index].pfnUnmarshall(
4492 pStubMsg->
Buffer = saved_buffer;
4505 unsigned flags = pFormat[1];
4506 unsigned index = *(
const WORD*)&pFormat[2];
4509 ULONG saved_buffer_length = 0;
4540 pStubMsg->
StubDesc->aUserMarshalQuadruple[
index].pfnBufferSize(
4543 if (saved_buffer_length)
4557 unsigned flags = pFormat[1];
4558 unsigned index = *(
const WORD*)&pFormat[2];
4559 DWORD memsize = *(
const WORD*)&pFormat[4];
4562 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
4580 FIXME(
"not implemented for varying buffer size\n");
4595 unsigned index = *(
const WORD*)&pFormat[2];
4637 (
unsigned char *)
msg->Buffer +
msg->BufferLength;
4651 WARN(
"unrecognised CBType %d\n", umcb->
CBType);
4664 FIXME(
"(%p,%p,%p): stub\n", pStubMsg, pFormat, ArgAddr);
4672 FIXME(
"(pStubMsg == ^%p, pFormat == ^%p): stub.\n", pStubMsg, pFormat);
4682 FIXME(
"(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %ld): stub.\n",
4683 pStubMsg, pFormat, NumberParams);
4688#include "pshpack1.h"
4714 ERR(
"invalid format type %x\n", pCStructFormat->
type);
4723 ERR(
"invalid array format type %x\n", pCStructFormat->
type);
4727 esize = *(
const WORD*)(pCArrayFormat+2);
4730 pCArrayFormat + 4, 0);
4739 if (pCStructFormat->
memory_size + bufsize < pCStructFormat->memory_size)
4741 ERR(
"integer overflow of memory_size %u with bufsize %lu\n",
4759 unsigned char **ppMemory,
4761 unsigned char fMustAlloc)
4766 unsigned char *saved_buffer;
4768 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4773 ERR(
"invalid format type %x\n", pCStructFormat->
type);
4781 ERR(
"invalid array format type %x\n", pCStructFormat->
type);
4785 esize = *(
const WORD*)(pCArrayFormat+2);
4794 if (pCStructFormat->
memory_size + bufsize < pCStructFormat->memory_size)
4796 ERR(
"integer overflow of memory_size %u with bufsize %lu\n",
4808 if (!pStubMsg->
IsClient && !*ppMemory)
4810 *ppMemory = pStubMsg->
Buffer;
4818 TRACE(
"copying %p to %p\n", saved_buffer, *ppMemory);
4819 if (*ppMemory != saved_buffer)
4841 ERR(
"invalid format type %x\n", pCStructFormat->
type);
4849 ERR(
"invalid array format type %x\n", pCStructFormat->
type);
4853 esize = *(
const WORD*)(pCArrayFormat+2);
4894 ERR(
"invalid format type %x\n", pCStructFormat->
type);
4903 ERR(
"invalid array format type %x\n", pCStructFormat->
type);
4909 pCArrayFormat + 4, 0);
4935 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
4957 pCVArrayFormat,
FALSE );
4968 unsigned char **ppMemory,
4970 unsigned char fMustAlloc)
4975 unsigned char *saved_buffer, *saved_array_buffer;
4977 unsigned char *array_memory;
4979 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4984 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
5000 if (!fMustAlloc && !*ppMemory)
5012 array_memory = *ppMemory + pCVStructFormat->
memory_size;
5014 &array_memory, pCVArrayFormat,
5023 saved_array_buffer = pStubMsg->
Buffer;
5031 TRACE(
"copying %p to %p\n", saved_array_buffer, *ppMemory + pCVStructFormat->
memory_size);
5058 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
5091 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
5096 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
5135 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
5151#include "pshpack1.h"
5182 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5192 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5198 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5213 unsigned char **ppMemory,
5215 unsigned char fMustAlloc)
5219 unsigned char *saved_buffer;
5221 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
5226 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5236 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5242 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5249 if (!pStubMsg->
IsClient && !*ppMemory)
5251 *ppMemory = pStubMsg->
Buffer;
5258 TRACE(
"copying %p to %p\n", saved_buffer, *ppMemory);
5259 if (*ppMemory != saved_buffer)
5260 memcpy(*ppMemory, saved_buffer, total_size);
5280 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5290 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5296 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5312 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
5317 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5327 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5333 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5358 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5364 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5368 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5382 DWORD elements, esize;
5390 ERR(
"invalid format type %x\n", pFormat[0]);
5400 pFormat +=
sizeof(
WORD);
5401 elements = *(
const WORD*)pFormat;
5402 pFormat +=
sizeof(
WORD);
5407 pFormat +=
sizeof(
DWORD);
5408 elements = *(
const DWORD*)pFormat;
5409 pFormat +=
sizeof(
DWORD);
5412 esize = *(
const WORD*)pFormat;
5413 pFormat +=
sizeof(
WORD);
5440 unsigned char **ppMemory,
5442 unsigned char fMustAlloc)
5447 unsigned char *saved_buffer;
5450 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
5455 ERR(
"invalid format type %x\n", pFormat[0]);
5466 pFormat +=
sizeof(
WORD);
5467 elements = *(
const WORD*)pFormat;
5468 pFormat +=
sizeof(
WORD);
5474 pFormat +=
sizeof(
DWORD);
5475 elements = *(
const DWORD*)pFormat;
5476 pFormat +=
sizeof(
DWORD);
5479 esize = *(
const WORD*)pFormat;
5480 pFormat +=
sizeof(
WORD);
5489 if (!fMustAlloc && !*ppMemory)
5511 DWORD elements, esize;
5518 ERR(
"invalid format type %x\n", pFormat[0]);
5528 pFormat +=
sizeof(
WORD);
5529 elements = *(
const WORD*)pFormat;
5530 pFormat +=
sizeof(
WORD);
5535 pFormat +=
sizeof(
DWORD);
5536 elements = *(
const DWORD*)pFormat;
5537 pFormat +=
sizeof(
DWORD);
5540 esize = *(
const WORD*)pFormat;
5541 pFormat +=
sizeof(
WORD);
5569 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
5574 ERR(
"invalid format type %x\n", pFormat[0]);
5585 pFormat +=
sizeof(
WORD);
5586 elements = *(
const WORD*)pFormat;
5587 pFormat +=
sizeof(
WORD);
5593 pFormat +=
sizeof(
DWORD);
5594 elements = *(
const DWORD*)pFormat;
5595 pFormat +=
sizeof(
DWORD);
5598 esize = *(
const WORD*)pFormat;
5599 pFormat +=
sizeof(
WORD);
5627 ERR(
"invalid format type %x\n", pFormat[0]);
5635 pFormat +=
sizeof(
WORD);
5636 elements = *(
const WORD*)pFormat;
5637 pFormat +=
sizeof(
WORD);
5642 pFormat +=
sizeof(
DWORD);
5643 elements = *(
const DWORD*)pFormat;
5644 pFormat +=
sizeof(
DWORD);
5647 pFormat +=
sizeof(
WORD);
5679 FIXME(
"Unhandled base type: 0x%02x\n",
fc);
5688 unsigned short num_arms,
arm,
type;
5690 num_arms = *(
const SHORT*)pFormat & 0x0fff;
5694 if(discriminant == *(
const ULONG*)pFormat)
5702 type = *(
const unsigned short*)pFormat;
5708 ERR(
"no arm for 0x%lx and no default case\n", discriminant);
5714 TRACE(
"falling back to empty default case for 0x%lx\n", discriminant);
5723 unsigned short type;
5731 type = *(
const unsigned short*)pFormat;
5732 if((
type & 0xff00) == 0x8000)
5743 unsigned char *saved_buffer =
NULL;
5752 saved_buffer = pStubMsg->
Buffer;
5757 pointer_buffer_mark_set =
TRUE;
5763 if (pointer_buffer_mark_set)
5769 ERR(
"buffer overflow - saved_buffer = %p, BufferEnd = %p\n",
5773 pStubMsg->
Buffer = saved_buffer + 4;
5785 FIXME(
"no marshaller for embedded type %02x\n", *
desc);
5791 unsigned char **ppMemory,
5794 unsigned char fMustAlloc)
5796 unsigned short type;
5804 type = *(
const unsigned short*)pFormat;
5805 if((
type & 0xff00) == 0x8000)
5816 unsigned char *saved_buffer =
NULL;
5825 saved_buffer = pStubMsg->
Buffer;
5830 pointer_buffer_mark_set =
TRUE;
5835 if (saved_buffer + 4 > pStubMsg->
BufferEnd)
5837 ERR(
"buffer overflow - saved_buffer = %p, BufferEnd = %p\n",
5842 PointerUnmarshall(pStubMsg, saved_buffer, *(
unsigned char ***)ppMemory, **(
unsigned char ***)ppMemory,
desc, fMustAlloc);
5843 if (pointer_buffer_mark_set)
5847 pStubMsg->
Buffer = saved_buffer + 4;
5852 m(pStubMsg, *(
unsigned char ***)ppMemory,
desc, fMustAlloc);
5855 m(pStubMsg, ppMemory,
desc, fMustAlloc);
5859 FIXME(
"no marshaller for embedded type %02x\n", *
desc);
5869 unsigned short type;
5877 type = *(
const unsigned short*)pFormat;
5878 if((
type & 0xff00) == 0x8000)
5903 ERR(
"BufferLength == 0??\n");
5922 FIXME(
"no buffersizer for embedded type %02x\n", *
desc);
5932 size = *(
const unsigned short*)pFormat;
5940 type = *(
const unsigned short*)pFormat;
5941 if((
type & 0xff00) == 0x8000)
5949 unsigned char *saved_buffer;
5959 saved_buffer = pStubMsg->
Buffer;
5967 return m(pStubMsg,
desc);
5971 FIXME(
"no marshaller for embedded type %02x\n", *
desc);
5983 unsigned short type;
5991 type = *(
const unsigned short*)pFormat;
5992 if((
type & 0xff00) != 0x8000)
6024 unsigned char switch_type;
6025 unsigned char increment;
6031 switch_type = *pFormat & 0xf;
6032 increment = (*pFormat & 0xf0) >> 4;
6038 TRACE(
"got switch value 0x%lx\n", switch_value);
6050 unsigned char **ppMemory,
6052 unsigned char fMustAlloc)
6054 unsigned char switch_type;
6055 unsigned char increment;
6057 unsigned short size;
6058 unsigned char *pMemoryArm;
6060 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
6063 switch_type = *pFormat & 0xf;
6064 increment = (*pFormat & 0xf0) >> 4;
6069 TRACE(
"got switch value 0x%lx\n", switch_value);
6071 size = *(
const unsigned short*)pFormat + increment;
6072 if (!fMustAlloc && !*ppMemory)
6086 pMemoryArm = *ppMemory + increment;
6098 unsigned char switch_type;
6099 unsigned char increment;
6105 switch_type = *pFormat & 0xf;
6106 increment = (*pFormat & 0xf0) >> 4;
6111 TRACE(
"got switch value 0x%lx\n", switch_value);
6126 unsigned char switch_type;
6127 unsigned char increment;
6130 switch_type = *pFormat & 0xf;
6131 increment = (*pFormat & 0xf0) >> 4;
6136 TRACE(
"got switch value 0x%lx\n", switch_value);
6138 pStubMsg->
Memory += increment;
6150 unsigned char switch_type;
6151 unsigned char increment;
6157 switch_type = *pFormat & 0xf;
6158 increment = (*pFormat & 0xf0) >> 4;
6162 TRACE(
"got switch value 0x%lx\n", switch_value);
6176 unsigned char switch_type;
6181 switch_type = *pFormat;
6195 LONG discriminant = 0;
6230 FIXME(
"Unhandled base type: 0x%02x\n", **ppFormat);
6235 return discriminant;
6242 unsigned char **ppMemory,
6244 unsigned char fMustAlloc)
6247 unsigned short size;
6249 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
6254 TRACE(
"unmarshalled discriminant %lx\n", discriminant);
6256 pFormat += *(
const SHORT*)pFormat;
6258 size = *(
const unsigned short*)pFormat;
6260 if (!fMustAlloc && !*ppMemory)
6283 unsigned char switch_type;
6288 switch_type = *pFormat;
6310 TRACE(
"unmarshalled discriminant 0x%lx\n", discriminant);
6347 unsigned char **ppMemory,
6349 unsigned char fMustAlloc)
6400 unsigned char **ppMemory,
6402 unsigned char fMustAlloc)
6447 unsigned char base_type;
6449 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6453 ERR(
"invalid format type %x\n", pRange->
type);
6468 unsigned char **ppMemory,
6470 unsigned char fMustAlloc)
6473 unsigned char base_type;
6475 TRACE(
"pStubMsg: %p, ppMemory: %p, type: 0x%02x, fMustAlloc: %s\n", pStubMsg, ppMemory, *pFormat, fMustAlloc ?
"true" :
"false");
6479 ERR(
"invalid format type %x\n", pRange->
type);
6485 TRACE(
"base_type = 0x%02x, low_value = %ld, high_value = %ld\n",
6488#define RANGE_UNMARSHALL(mem_type, wire_type, format_spec) \
6491 align_pointer(&pStubMsg->Buffer, sizeof(wire_type)); \
6492 if (!fMustAlloc && !*ppMemory) \
6493 fMustAlloc = TRUE; \
6495 *ppMemory = NdrAllocate(pStubMsg, sizeof(mem_type)); \
6496 if (pStubMsg->Buffer + sizeof(wire_type) > pStubMsg->BufferEnd) \
6498 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n", \
6499 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength); \
6500 RpcRaiseException(RPC_X_BAD_STUB_DATA); \
6502 if ((*(wire_type *)pStubMsg->Buffer < (mem_type)pRange->low_value) || \
6503 (*(wire_type *)pStubMsg->Buffer > (mem_type)pRange->high_value)) \
6505 ERR("value exceeded bounds: " format_spec ", low: " format_spec ", high: " format_spec "\n", \
6506 *(wire_type *)pStubMsg->Buffer, (mem_type)pRange->low_value, \
6507 (mem_type)pRange->high_value); \
6508 RpcRaiseException(RPC_S_INVALID_BOUND); \
6511 TRACE("*ppMemory: %p\n", *ppMemory); \
6512 **(mem_type **)ppMemory = *(wire_type *)pStubMsg->Buffer; \
6513 pStubMsg->Buffer += sizeof(wire_type); \
6521 TRACE(
"value: 0x%02x\n", **ppMemory);
6526 TRACE(
"value: 0x%02x\n", **ppMemory);
6540 TRACE(
"value: 0x%08lx\n", **(
ULONG **)ppMemory);
6544 TRACE(
"value: 0x%08lx\n", **(
ULONG **)ppMemory);
6548 TRACE(
"value: 0x%08x\n", **(
UINT **)ppMemory);
6554 ERR(
"invalid range base type: 0x%02x\n", base_type);
6570 unsigned char base_type;
6572 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6576 ERR(
"invalid format type %x\n", pRange->
type);
6592 unsigned char base_type;
6596 ERR(
"invalid format type %x\n", pRange->
type);
6612 TRACE(
"pStubMsg %p pMemory %p type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6625 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6686 FIXME(
"Unhandled base type: 0x%02x\n", *pFormat);
6698 unsigned char **ppMemory,
6700 unsigned char fMustAlloc)
6702 TRACE(
"pStubMsg: %p, ppMemory: %p, type: 0x%02x, fMustAlloc: %s\n", pStubMsg, ppMemory, *pFormat, fMustAlloc ?
"true" :
"false");
6704#define BASE_TYPE_UNMARSHALL(type) do { \
6705 align_pointer(&pStubMsg->Buffer, sizeof(type)); \
6706 if (!fMustAlloc && !pStubMsg->IsClient && !*ppMemory) \
6708 *ppMemory = pStubMsg->Buffer; \
6709 TRACE("*ppMemory: %p\n", *ppMemory); \
6710 safe_buffer_increment(pStubMsg, sizeof(type)); \
6715 *ppMemory = NdrAllocate(pStubMsg, sizeof(type)); \
6716 TRACE("*ppMemory: %p\n", *ppMemory); \
6717 safe_copy_from_buffer(pStubMsg, *ppMemory, sizeof(type)); \
6728 TRACE(
"value: 0x%02x\n", **ppMemory);
6741 TRACE(
"value: 0x%08lx\n", **(
ULONG **)ppMemory);
6745 TRACE(
"value: %f\n", **(
float **)ppMemory);
6749 TRACE(
"value: %f\n", **(
double **)ppMemory);
6759 if (!fMustAlloc && !*ppMemory)
6766 TRACE(
"value: 0x%08x\n", **(
UINT **)ppMemory);
6775 if (!fMustAlloc && !*ppMemory)
6790 if (!fMustAlloc && !*ppMemory)
6802 FIXME(
"Unhandled base type: 0x%02x\n", *pFormat);
6804#undef BASE_TYPE_UNMARSHALL
6819 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6863 FIXME(
"Unhandled base type: 0x%02x\n", *pFormat);
6874 TRACE(
"pStubMsg %p, type 0x%02x\n", pStubMsg, *pFormat);
6884 return sizeof(
UCHAR);
6900 return sizeof(
ULONG);
6906 return sizeof(
float);
6930 return sizeof(
UINT);
6941 return sizeof(
void *);
6943 FIXME(
"Unhandled base type: 0x%02x\n", *pFormat);
6955 TRACE(
"pStubMsg %p pMemory %p type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6968 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6972 ERR(
"invalid format type %x\n", *pFormat);
6987 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6991 ERR(
"invalid format type %x\n", *pFormat);
6994 TRACE(
"flags: 0x%02x\n", pFormat[1]);
7018 unsigned char **ppMemory,
7020 unsigned char fMustAlloc)
7022 TRACE(
"pStubMsg %p, ppMemory %p, pFormat %p, fMustAlloc %s\n", pStubMsg,
7023 ppMemory, pFormat, fMustAlloc ?
"TRUE":
"FALSE");
7027 ERR(
"invalid format type %x\n", *pFormat);
7030 TRACE(
"flags: 0x%02x\n", pFormat[1]);
7064 TRACE(
"(%p, %p, %d)\n", pStubMsg, ContextHandle, fCheck);
7070 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7089 TRACE(
"(%p, %p, %p)\n", pStubMsg, pContextHandle, BindHandle);
7108 TRACE(
"(%p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine);
7114 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7129 TRACE(
"(%p)\n", pStubMsg);
7135 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7146 return ContextHandle;
7153 FIXME(
"(%p, %p, %p): stub\n", pStubMsg,
pMemory, pFormat);
7162 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
7187 TRACE(
"(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat);
7193 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7220 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
7226 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7247 return ContextHandle;
7288 FIXME(
"(%p): stub\n", pStubMsg);
ACPI_SIZE strlen(const char *String)
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
unsigned long error_status_t
static VOID Mark(PGUI_CONSOLE_DATA GuiData)
static __inline const char * debugstr_an(const char *s, int n)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, PFORMAT_STRING pPointer, unsigned char fMustAlloc)
static unsigned char * union_arm_marshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, ULONG discriminant, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrConformantVaryingStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
static ULONG safe_multiply(ULONG a, ULONG b)
void WINAPI NdrContextHandleSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrFixedArrayFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static unsigned char * union_arm_unmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, ULONG discriminant, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
void WINAPI NdrVaryingArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void safe_copy_to_buffer(MIDL_STUB_MESSAGE *pStubMsg, const void *p, ULONG size)
void WINAPI NdrConformantStructFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void array_buffer_size(unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, unsigned char fHasPointers)
static ULONG array_read_conformance(unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
static ULONG EmbeddedComplexMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
ULONG WINAPI NdrSimpleStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
PFORMAT_STRING ComputeConformanceOrVariance(MIDL_STUB_MESSAGE *pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, ULONG_PTR def, ULONG_PTR *pCount)
void WINAPI NdrServerContextMarshall(PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle, NDR_RUNDOWN RundownRoutine)
#define NDR_LOCAL_UINT32_WRITE(pchar, uint32)
static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, PFORMAT_STRING pPointer)
void WINAPI NdrCorrelationPass(PMIDL_STUB_MESSAGE pStubMsg)
static unsigned char *WINAPI NdrRangeMarshall(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
static unsigned char * EmbeddedPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void EmbeddedPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
struct _NDR_CSTRUCT_FORMAT NDR_CSTRUCT_FORMAT
static void WINAPI NdrRangeFree(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
void WINAPI NdrConvert2(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, LONG NumberParams)
static void UserMarshalCB(PMIDL_STUB_MESSAGE pStubMsg, USER_MARSHAL_CB_TYPE cbtype, PFORMAT_STRING pFormat, USER_MARSHAL_CB *umcb)
static void SizeConformance(MIDL_STUB_MESSAGE *pStubMsg)
unsigned char *WINAPI NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
void WINAPI NdrFixedArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
unsigned char *WINAPI NdrConformantStringMarshall(MIDL_STUB_MESSAGE *pStubMsg, unsigned char *pszMessage, PFORMAT_STRING pFormat)
static void WriteConformance(MIDL_STUB_MESSAGE *pStubMsg)
static BOOL IsConformanceOrVariancePresent(PFORMAT_STRING pFormat)
void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle, NDR_RUNDOWN RundownRoutine, PFORMAT_STRING pFormat)
static void SizeVariance(MIDL_STUB_MESSAGE *pStubMsg)
void WINAPI NdrComplexArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static PFORMAT_STRING SkipConformance(const PMIDL_STUB_MESSAGE pStubMsg, const PFORMAT_STRING pFormat)
static unsigned char * ComplexBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, PFORMAT_STRING pPointer)
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)
static ULONG WINAPI NdrByteCountPointerMemorySize(PMIDL_STUB_MESSAGE, PFORMAT_STRING)
unsigned char *WINAPI NdrByteCountPointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
#define BASE_TYPE_UNMARSHALL(type)
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)
static unsigned char *WINAPI NdrBaseTypeUnmarshall(PMIDL_STUB_MESSAGE, unsigned char **, PFORMAT_STRING, unsigned char)
void WINAPI NdrXmitOrRepAsFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static PFORMAT_STRING get_arm_offset_from_union_arm_selector(PMIDL_STUB_MESSAGE pStubMsg, ULONG discriminant, PFORMAT_STRING pFormat)
ULONG WINAPI NdrNonEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrPointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
ULONG WINAPI NdrXmitOrRepAsMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
ULONG WINAPI NdrConformantArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
unsigned char *WINAPI NdrConformantStringUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
static void align_pointer_offset(unsigned char **ptr, unsigned char *base, unsigned int align)
void WINAPI NdrByteCountPointerFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrConformantVaryingArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void align_length(ULONG *len, unsigned int align)
void WINAPI NdrCorrelationFree(PMIDL_STUB_MESSAGE pStubMsg)
static PFORMAT_STRING SkipVariance(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
void WINAPI NdrComplexArrayFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrSimpleTypeUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, unsigned char FormatChar)
static void WINAPI NdrBaseTypeFree(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
static void safe_copy_from_buffer(MIDL_STUB_MESSAGE *pStubMsg, void *p, ULONG size)
void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
#define RANGE_UNMARSHALL(mem_type, wire_type, format_spec)
static void PointerFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *Pointer, PFORMAT_STRING pFormat)
ULONG WINAPI NdrFixedArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
void WINAPI NdrConformantVaryingArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void array_free(unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, unsigned char fHasPointers)
static void NdrFree(MIDL_STUB_MESSAGE *pStubMsg, unsigned char *Pointer)
void WINAPI NdrNonEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void safe_buffer_increment(MIDL_STUB_MESSAGE *pStubMsg, ULONG size)
NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
void WINAPI NdrSimpleStructFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
#define USER_MARSHAL_PTR_PREFIX
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 NdrNonEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void WINAPI NdrRangeBufferSize(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
void WINAPI NdrClientContextMarshall(PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT ContextHandle, int fCheck)
unsigned char *WINAPI NdrSimpleStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
void WINAPI NdrClearOutParameters(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, void *ArgAddr)
void WINAPI NdrConformantVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static ULONG WINAPI NdrBaseTypeMemorySize(PMIDL_STUB_MESSAGE, PFORMAT_STRING)
unsigned char *WINAPI NdrConformantVaryingStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void WINAPI NdrContextHandleBufferSize(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
ULONG WINAPI NdrConformantStringMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
static void array_memory_size(unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, unsigned char fHasPointers)
NDR_SCONTEXT WINAPI NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg)
static PFORMAT_STRING ReadVariance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat, ULONG MaxValue)
static void align_pointer(unsigned char **ptr, unsigned int align)
unsigned char *WINAPI NdrNonConformantStringMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *Buffer, unsigned char *Pointer, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrNonConformantStringUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
unsigned char *WINAPI NdrFixedArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
#define NDR_LOCAL_UINT32_READ(pchar)
unsigned char *WINAPI NdrConformantStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static ULONG EmbeddedPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrUserMarshalUnmarshall(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)
static void align_pointer_offset_clear(unsigned char **ptr, unsigned char *base, unsigned int align)
void WINAPI NdrComplexStructFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
static void dump_pointer_attr(unsigned char attr)
static unsigned char *WINAPI NdrContextHandleMarshall(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
unsigned char *WINAPI NdrVaryingArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrUserMarshalMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
const NDR_MEMORYSIZE NdrMemorySizer[NDR_TABLE_SIZE]
unsigned char *WINAPI NdrXmitOrRepAsMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrConformantArrayFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrByteCountPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrClientContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT *pContextHandle, RPC_BINDING_HANDLE BindHandle)
ULONG ComplexStructSize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
static void array_compute_and_size_conformance(unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static ULONG union_arm_memory_size(PMIDL_STUB_MESSAGE pStubMsg, ULONG discriminant, PFORMAT_STRING pFormat)
void WINAPI NdrConformantVaryingStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrSimpleStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
const NDR_BUFFERSIZE NdrBufferSizer[NDR_TABLE_SIZE]
void WINAPI NdrXmitOrRepAsBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrRangeUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
ULONG WINAPI NdrUserMarshalMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
static LONG unmarshall_discriminant(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING *ppFormat)
NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
void WINAPI NdrConformantStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static ULONG get_discriminant(unsigned char fc, const unsigned char *pMemory)
unsigned char *WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
void WINAPI NdrNonEncapsulatedUnionFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *Pointer, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrConformantArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
const NDR_MARSHALL NdrMarshaller[NDR_TABLE_SIZE]
ULONG WINAPI NdrPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrNonEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
static ULONG WINAPI NdrRangeMemorySize(PMIDL_STUB_MESSAGE, PFORMAT_STRING)
static void safe_buffer_length_increment(MIDL_STUB_MESSAGE *pStubMsg, ULONG size)
static unsigned char * ComplexFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, PFORMAT_STRING pPointer)
void *WINAPI NdrAllocate(MIDL_STUB_MESSAGE *pStubMsg, SIZE_T len)
static ULONG ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, PFORMAT_STRING pPointer)
static ULONG EmbeddedComplexSize(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
static unsigned char * EmbeddedPointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pDstBuffer, unsigned char *pSrcMemoryPtrs, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
void WINAPI NdrCorrelationInitialize(PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG Flags)
void WINAPI NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void align_pointer_clear(unsigned char **ptr, unsigned int align)
#define NDR_POINTER_ID(pStubMsg)
static void union_arm_free(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, ULONG discriminant, PFORMAT_STRING pFormat)
ULONG WINAPI NdrEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
ULONG WINAPI NdrComplexArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
static ULONG PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *Buffer, PFORMAT_STRING pFormat)
static void union_arm_buffer_size(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, ULONG discriminant, PFORMAT_STRING pFormat)
struct _NDR_MEMORY_LIST NDR_MEMORY_LIST
static void array_compute_and_write_conformance(unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrXmitOrRepAsUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
static void array_write_variance_and_marshall(unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, unsigned char fHasPointers)
void WINAPI NdrEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrFixedArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
const NDR_UNMARSHALL NdrUnmarshaller[NDR_TABLE_SIZE]
void WINAPI NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void EmbeddedPointerFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
unsigned char *WINAPI NdrEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
ULONG WINAPI NdrNonConformantStringMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
ULONG WINAPI NdrConformantVaryingArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
void WINAPI NdrSimpleTypeMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, unsigned char FormatChar)
void WINAPI NdrConvert(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
static ULONG array_read_variance_and_unmarshall(unsigned char fc, PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc, unsigned char fUseBufferMemoryServer, unsigned char fUnmarshall)
#define STD_OVERFLOW_CHECK(_Msg)
void WINAPI NdrEncapsulatedUnionFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
ULONG WINAPI NdrConformantStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
struct _NDR_CSTRUCT_FORMAT NDR_CVSTRUCT_FORMAT
static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *Buffer, unsigned char **pPointer, unsigned char *pSrcPointer, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
unsigned char *WINAPI NdrConformantVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
static unsigned char *WINAPI NdrBaseTypeMarshall(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
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)
void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static unsigned char *WINAPI NdrContextHandleUnmarshall(PMIDL_STUB_MESSAGE, unsigned char **, PFORMAT_STRING, unsigned char)
void WINAPI NdrUserMarshalFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void * NdrAllocateZero(MIDL_STUB_MESSAGE *stubmsg, SIZE_T len)
const NDR_FREE NdrFreer[NDR_TABLE_SIZE]
static void validate_string_data(MIDL_STUB_MESSAGE *pStubMsg, ULONG bufsize, ULONG esize)
void WINAPI NdrByteCountPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
static void WriteVariance(MIDL_STUB_MESSAGE *pStubMsg)
ULONG WINAPI NdrVaryingArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
ULONG WINAPI NdrConformantVaryingStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
static PFORMAT_STRING ReadConformance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
static void WINAPI NdrBaseTypeBufferSize(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
int align(int length, int align)
Character const *const size_t const max_count
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei const GLvoid * pointer
GLboolean GLboolean GLboolean b
GLenum GLuint GLsizei bufsize
GLboolean GLboolean GLboolean GLboolean a
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 * u
#define memcpy(s1, s2, n)
D3D11_SHADER_VARIABLE_DESC desc
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
static float(__cdecl *square_half_float)(float x
unsigned __int3264 UINT_PTR
NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation, void *CtxGuard, ULONG Flags)
void WINAPI NDRCContextUnmarshall(NDR_CCONTEXT *CContext, RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation)
void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding, NDR_SCONTEXT SContext, void *pBuff, NDR_RUNDOWN userRunDownIn, void *CtxGuard, ULONG Flags)
void WINAPI NDRCContextMarshall(NDR_CCONTEXT CContext, void *pBuff)
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)
int WINAPI NdrFullPointerQueryPointer(PFULL_PTR_XLAT_TABLES pXlatTables, void *pPointer, unsigned char QueryType, ULONG *pRefId)
void WINAPI NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId, void *pPointer)
void(WINAPI * NDR_BUFFERSIZE)(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
static PFORMAT_STRING ComputeConformance(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, ULONG def)
unsigned char *(WINAPI * NDR_UNMARSHALL)(PMIDL_STUB_MESSAGE, unsigned char **, PFORMAT_STRING, unsigned char)
static PFORMAT_STRING ComputeVariance(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, ULONG def)
ULONG(WINAPI * NDR_MEMORYSIZE)(PMIDL_STUB_MESSAGE, PFORMAT_STRING)
unsigned char *(WINAPI * NDR_MARSHALL)(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
void(WINAPI * NDR_FREE)(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)
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 NdrInterfacePointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
ULONG WINAPI NdrInterfacePointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
void WINAPI NdrInterfacePointerFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
#define FC_TOP_LEVEL_CONFORMANCE
#define FC_POINTER_CONFORMANCE
#define HANDLE_PARAM_IS_OUT
#define FC_ALLOCATE_ALL_NODES
#define NDR_CONTEXT_HANDLE_SERIALIZE
#define USER_MARSHAL_POINTER
@ FC_NON_ENCAPSULATED_UNION
#define FC_NORMAL_CONFORMANCE
#define HANDLE_PARAM_IS_IN
#define FC_SIMPLE_POINTER
#define NDR_CONTEXT_HANDLE_NOSERIALIZE
#define FC_TOP_LEVEL_MULTID_CONFORMANCE
#define FC_CONSTANT_CONFORMANCE
#define FC_ALLOCED_ON_STACK
#define NDR_STRICT_CONTEXT_HANDLE
#define HANDLE_PARAM_IS_VIA_PTR
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
#define RPC_CONTEXT_HANDLE_DONT_SERIALIZE
#define RPC_CONTEXT_HANDLE_SERIALIZE
const unsigned char * PFORMAT_STRING
@ USER_MARSHAL_CB_BUFFER_SIZE
@ USER_MARSHAL_CB_UNMARSHALL
@ USER_MARSHAL_CB_MARSHALL
void(__RPC_USER * NDR_RUNDOWN)(void *context)
#define USER_MARSHAL_CB_SIGNATURE
#define NDRSContextValue(hContext)
#define RPC_S_INVALID_ARG
#define RPC_X_INVALID_BUFFER
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
_In_ size_t const maxsize
PNDR_CORRELATION_INFO pCorrInfo
unsigned char CorrDespIncrement
struct IRpcChannelBuffer * pRpcChannelBuffer
struct _FULL_PTR_XLAT_TABLES * FullPtrXlatTables
int IgnoreEmbeddedPointers
unsigned char * BufferMark
unsigned char * BufferEnd
const struct _MIDL_STUB_DESC * StubDesc
unsigned char * BufferStart
unsigned int fHasNewCorrDesc
unsigned char * PointerBufferMark
struct _NDR_MEMORY_LIST * next
struct IRpcChannelBuffer * pRpcChannelBuffer
NDR_USER_MARSHAL_INFO_LEVEL1 Level1
RPC_BINDING_HANDLE Handle
RPC_SYNTAX_IDENTIFIER InterfaceId
USER_MARSHAL_CB_TYPE CBType
PFORMAT_STRING pTypeFormat
PMIDL_STUB_MESSAGE pStubMsg
static unsigned int bufptr
#define CONTAINING_RECORD(address, type, field)
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
#define RPC_S_INVALID_BOUND
#define RPC_S_INVALID_TAG
#define RPC_X_ENUM_VALUE_OUT_OF_RANGE
#define RPC_X_BAD_STUB_DATA
#define RPC_X_NULL_REF_POINTER
#define RPC_S_INTERNAL_ERROR
_Must_inspect_result_ _In_ ULONG Flags