36#define NONAMELESSUNION
50# define LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32) \
51 (*((UINT32 *)(pchar)) = (uint32))
53# define LITTLE_ENDIAN_UINT32_READ(pchar) \
54 (*((UINT32 *)(pchar)))
57# define LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32) \
58 (*(pchar) = LOBYTE(LOWORD(uint32)), \
59 *((pchar)+1) = HIBYTE(LOWORD(uint32)), \
60 *((pchar)+2) = LOBYTE(HIWORD(uint32)), \
61 *((pchar)+3) = HIBYTE(HIWORD(uint32)))
63# define LITTLE_ENDIAN_UINT32_READ(pchar) \
65 MAKEWORD(*(pchar), *((pchar)+1)), \
66 MAKEWORD(*((pchar)+2), *((pchar)+3))))
69#define BIG_ENDIAN_UINT32_WRITE(pchar, uint32) \
70 (*((pchar)+3) = LOBYTE(LOWORD(uint32)), \
71 *((pchar)+2) = HIBYTE(LOWORD(uint32)), \
72 *((pchar)+1) = LOBYTE(HIWORD(uint32)), \
73 *(pchar) = HIBYTE(HIWORD(uint32)))
75#define BIG_ENDIAN_UINT32_READ(pchar) \
77 MAKEWORD(*((pchar)+3), *((pchar)+2)), \
78 MAKEWORD(*((pchar)+1), *(pchar))))
80#ifdef NDR_LOCAL_IS_BIG_ENDIAN
81# define NDR_LOCAL_UINT32_WRITE(pchar, uint32) \
82 BIG_ENDIAN_UINT32_WRITE(pchar, uint32)
83# define NDR_LOCAL_UINT32_READ(pchar) \
84 BIG_ENDIAN_UINT32_READ(pchar)
86# define NDR_LOCAL_UINT32_WRITE(pchar, uint32) \
87 LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32)
88# define NDR_LOCAL_UINT32_READ(pchar) \
89 LITTLE_ENDIAN_UINT32_READ(pchar)
123#define STD_OVERFLOW_CHECK(_Msg) do { \
124 TRACE("buffer=%d/%d\n", (ULONG)(_Msg->Buffer - (unsigned char *)_Msg->RpcMsg->Buffer), _Msg->BufferLength); \
125 if (_Msg->Buffer > (unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength) \
126 ERR("buffer overflow %d bytes\n", (ULONG)(_Msg->Buffer - ((unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength))); \
129#define NDR_POINTER_ID_BASE 0x20000
130#define NDR_POINTER_ID(pStubMsg) (NDR_POINTER_ID_BASE + ((pStubMsg)->UniquePtrCount++) * 4)
131#define NDR_TABLE_SIZE 128
132#define NDR_TABLE_MASK 127
163 unsigned char fMustAlloc);
400#define MEML_MAGIC ('M' << 24 | 'E' << 16 | 'M' << 8 | 'L')
426 aligned_len = (
len + 7) & ~7;
429 if (adjusted_len <
len)
431 ERR(
"overflow of adjusted_len %ld, len %ld\n", adjusted_len,
len);
435 p = pStubMsg->pfnAllocate(adjusted_len);
440 mem_list->
size = aligned_len;
458 TRACE(
"(%p, %p)\n", pStubMsg, Pointer);
460 pStubMsg->pfnFree(Pointer);
465 return (*(
const ULONG *)pFormat != -1);
480 TRACE(
"unmarshalled conformance is %ld\n", pStubMsg->
MaxCount);
506 ERR(
"invalid array bound(s): ActualCount = %d, Offset = %d, MaxValue = %d\n",
560 BYTE dtype = pFormat[0] & 0xf;
561 short ofs = *(
const short *)&pFormat[2];
571 switch (pFormat[0] & 0xf0) {
573 TRACE(
"normal conformance, ofs=%d\n", ofs);
577 TRACE(
"pointer conformance, ofs=%d\n", ofs);
581 TRACE(
"toplevel conformance, ofs=%d\n", ofs);
592 TRACE(
"constant conformance, val=%ld\n",
data);
596 FIXME(
"toplevel multidimensional conformance, ofs=%d\n", ofs);
606 FIXME(
"unknown conformance type %x, expect crash.\n", pFormat[0] & 0xf0);
610 switch (pFormat[1]) {
616 unsigned char *old_stack_top = pStubMsg->
StackTop;
622 TRACE(
"callback conformance into apfnExprEval[%d]\n", ofs);
623 pStubMsg->
StubDesc->apfnExprEval[ofs](pStubMsg);
661 FIXME(
"unknown conformance data type %x\n", dtype);
664 TRACE(
"dereferenced data type %x at %p, got %ld\n", dtype,
ptr,
data);
667 switch (pFormat[1]) {
685 FIXME(
"unknown conformance op %d\n", pFormat[1]);
690 TRACE(
"resulting conformance is %ld\n", *pCount);
705 if (
ret > 0xffffffff)
725 ERR(
"buffer length overflow - BufferLength = %u, size = %u\n",
739 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p, size = %u\n",
744 ERR(
"pointer is the same as the buffer\n");
755 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p, size = %u\n",
774 ERR(
"bufsize 0x%x exceeded buffer end %p of buffer %p\n",
bufsize,
782 ERR(
"invalid string length of %d\n",
bufsize / esize);
789 ERR(
"string not null-terminated at byte position %d, data is 0x%x\n",
798 TRACE(
" FC_ALLOCATE_ALL_NODES");
800 TRACE(
" FC_DONT_FREE");
802 TRACE(
" FC_ALLOCED_ON_STACK");
804 TRACE(
" FC_SIMPLE_POINTER");
806 TRACE(
" FC_POINTER_DEREF");
815 unsigned char *Pointer,
818 unsigned type = pFormat[0],
attr = pFormat[1];
822 BOOL pointer_needs_marshaling;
824 TRACE(
"(%p,%p,%p,%p)\n", pStubMsg,
Buffer, Pointer, pFormat);
828 else desc = pFormat + *(
const SHORT*)pFormat;
834 ERR(
"NULL ref pointer is not allowed\n");
837 pointer_needs_marshaling =
TRUE;
842 pointer_needs_marshaling =
TRUE;
844 pointer_needs_marshaling =
FALSE;
846 TRACE(
"writing 0x%08x to buffer\n", pointer_id);
852 TRACE(
"writing 0x%08x to buffer\n", pointer_id);
856 FIXME(
"unhandled ptr type=%02x\n",
type);
861 TRACE(
"calling marshaller for type 0x%x\n", (
int)*
desc);
863 if (pointer_needs_marshaling) {
865 Pointer = *(
unsigned char**)Pointer;
866 TRACE(
"deref => %p\n", Pointer);
869 if (
m)
m(pStubMsg, Pointer,
desc);
870 else FIXME(
"no marshaller for data type=%02x\n", *
desc);
885 unsigned char **pPointer,
886 unsigned char *pSrcPointer,
888 unsigned char fMustAlloc)
890 unsigned type = pFormat[0],
attr = pFormat[1];
893 DWORD pointer_id = 0;
894 BOOL pointer_needs_unmarshaling, need_alloc =
FALSE, inner_must_alloc =
FALSE;
896 TRACE(
"(%p,%p,%p,%p,%p,%d)\n", pStubMsg,
Buffer, pPointer, pSrcPointer, pFormat, fMustAlloc);
900 else desc = pFormat + *(
const SHORT*)pFormat;
904 pointer_needs_unmarshaling =
TRUE;
908 TRACE(
"pointer_id is 0x%08x\n", pointer_id);
910 pointer_needs_unmarshaling =
TRUE;
913 pointer_needs_unmarshaling =
FALSE;
918 TRACE(
"pointer_id is 0x%08x\n", pointer_id);
922 inner_must_alloc =
TRUE;
925 FIXME(
"free object pointer %p\n", pSrcPointer);
927 pointer_needs_unmarshaling =
TRUE;
931 pointer_needs_unmarshaling =
FALSE;
936 TRACE(
"pointer_id is 0x%08x\n", pointer_id);
941 FIXME(
"unhandled ptr type=%02x\n",
type);
946 if (pointer_needs_unmarshaling) {
947 unsigned char **current_ptr = pPointer;
956 TRACE(
"setting *pPointer to %p\n", pSrcPointer);
957 *pPointer = pSrcPointer;
960 need_alloc = inner_must_alloc =
TRUE;
972 *pPointer = pSrcPointer;
981 FIXME(
"FC_ALLOCATE_ALL_NODES not implemented\n");
987 current_ptr = *(
unsigned char***)current_ptr;
988 TRACE(
"deref => %p\n", current_ptr);
991 if (
m)
m(pStubMsg, current_ptr,
desc, inner_must_alloc);
992 else FIXME(
"no unmarshaller for data type=%02x\n", *
desc);
999 TRACE(
"pointer=%p\n", *pPointer);
1006 unsigned char *Pointer,
1009 unsigned type = pFormat[0],
attr = pFormat[1];
1012 BOOL pointer_needs_sizing;
1015 TRACE(
"(%p,%p,%p)\n", pStubMsg, Pointer, pFormat);
1019 else desc = pFormat + *(
const SHORT*)pFormat;
1025 ERR(
"NULL ref pointer is not allowed\n");
1038 if (!pointer_needs_sizing)
1042 FIXME(
"unhandled ptr type=%02x\n",
type);
1048 Pointer = *(
unsigned char**)Pointer;
1049 TRACE(
"deref => %p\n", Pointer);
1053 if (
m)
m(pStubMsg, Pointer,
desc);
1054 else FIXME(
"no buffersizer for data type=%02x\n", *
desc);
1063 unsigned type = pFormat[0],
attr = pFormat[1];
1066 DWORD pointer_id = 0;
1067 BOOL pointer_needs_sizing;
1073 else desc = pFormat + *(
const SHORT*)pFormat;
1077 pointer_needs_sizing =
TRUE;
1082 TRACE(
"pointer_id is 0x%08x\n", pointer_id);
1084 pointer_needs_sizing =
TRUE;
1086 pointer_needs_sizing =
FALSE;
1092 TRACE(
"pointer_id is 0x%08x\n", pointer_id);
1098 FIXME(
"unhandled ptr type=%02x\n",
type);
1109 if (pointer_needs_sizing) {
1111 if (
m)
m(pStubMsg,
desc);
1112 else FIXME(
"no memorysizer for data type=%02x\n", *
desc);
1122 unsigned char *Pointer,
1125 unsigned type = pFormat[0],
attr = pFormat[1];
1128 unsigned char *current_pointer = Pointer;
1130 TRACE(
"(%p,%p,%p)\n", pStubMsg, Pointer, pFormat);
1135 else desc = pFormat + *(
const SHORT*)pFormat;
1137 if (!Pointer)
return;
1142 if (!pointer_needs_freeing)
1147 current_pointer = *(
unsigned char**)Pointer;
1148 TRACE(
"deref => %p\n", current_pointer);
1152 if (
m)
m(pStubMsg, current_pointer,
desc);
1164 TRACE(
"not freeing stack ptr %p\n", Pointer);
1167 TRACE(
"freeing %p\n", Pointer);
1171 TRACE(
"not freeing %p\n", Pointer);
1184 unsigned char *saved_buffer =
NULL;
1193 saved_buffer = pStubMsg->
Buffer;
1198 while (pFormat[0] !=
FC_END) {
1199 switch (pFormat[0]) {
1201 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1210 rep = *(
const WORD*)&pFormat[2];
1222 for (
i = 0;
i < rep;
i++) {
1229 unsigned char *memptr = membase + *(
const SHORT*)&
info[0];
1231 unsigned char *saved_memory = pStubMsg->
Memory;
1233 pStubMsg->
Memory = membase;
1235 pStubMsg->
Memory = saved_memory;
1238 pFormat += 8 *
count;
1244 pStubMsg->
Buffer = saved_buffer;
1261 unsigned char *pDstBuffer,
1262 unsigned char *pSrcMemoryPtrs,
1264 unsigned char fMustAlloc)
1269 unsigned char *saved_buffer =
NULL;
1271 TRACE(
"(%p,%p,%p,%p,%d)\n", pStubMsg, pDstBuffer, pSrcMemoryPtrs, pFormat, fMustAlloc);
1278 saved_buffer = pStubMsg->
Buffer;
1283 while (pFormat[0] !=
FC_END) {
1284 TRACE(
"pFormat[0] = 0x%x\n", pFormat[0]);
1285 switch (pFormat[0]) {
1287 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1296 rep = *(
const WORD*)&pFormat[2];
1308 for (
i = 0;
i < rep;
i++) {
1310 unsigned char *bufdstbase = pDstBuffer + (
i *
stride);
1311 unsigned char *memsrcbase = pSrcMemoryPtrs + (
i *
stride);
1316 unsigned char **bufdstptr = (
unsigned char **)(bufdstbase + *(
const SHORT*)&
info[2]);
1317 unsigned char **memsrcptr = (
unsigned char **)(memsrcbase + *(
const SHORT*)&
info[0]);
1322 pFormat += 8 *
count;
1328 pStubMsg->
Buffer = saved_buffer;
1343 ULONG saved_buffer_length = 0;
1349 if (*pFormat !=
FC_PP)
return;
1359 while (pFormat[0] !=
FC_END) {
1360 switch (pFormat[0]) {
1362 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1371 rep = *(
const WORD*)&pFormat[2];
1383 for (
i = 0;
i < rep;
i++) {
1389 unsigned char *memptr = membase + *(
const SHORT*)&
info[0];
1390 unsigned char *saved_memory = pStubMsg->
Memory;
1392 pStubMsg->
Memory = membase;
1394 pStubMsg->
Memory = saved_memory;
1397 pFormat += 8 *
count;
1400 if (saved_buffer_length)
1416 unsigned char *saved_buffer =
NULL;
1418 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
1424 saved_buffer = pStubMsg->
Buffer;
1429 if (*pFormat !=
FC_PP)
return 0;
1432 while (pFormat[0] !=
FC_END) {
1433 switch (pFormat[0]) {
1435 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1444 rep = *(
const WORD*)&pFormat[2];
1456 for (
i = 0;
i < rep;
i++) {
1465 pFormat += 8 *
count;
1471 pStubMsg->
Buffer = saved_buffer;
1488 if (*pFormat !=
FC_PP)
return;
1491 while (pFormat[0] !=
FC_END) {
1492 switch (pFormat[0]) {
1494 FIXME(
"unknown repeat type %d; assuming no repeat\n", pFormat[0]);
1503 rep = *(
const WORD*)&pFormat[2];
1515 for (
i = 0;
i < rep;
i++) {
1521 unsigned char *memptr = membase + *(
const SHORT*)&
info[0];
1522 unsigned char *saved_memory = pStubMsg->
Memory;
1524 pStubMsg->
Memory = membase;
1526 pStubMsg->
Memory = saved_memory;
1529 pFormat += 8 *
count;
1547 if (*pFormat !=
FC_RP)
1565 unsigned char **ppMemory,
1567 unsigned char fMustAlloc)
1571 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
1573 if (*pFormat ==
FC_RP)
1579 if (pStubMsg->
IsClient && !*ppMemory)
1581 ERR(
"NULL ref pointer is not allowed\n");
1613 if (*pFormat !=
FC_RP)
1629 if (*pFormat !=
FC_RP)
1653 unsigned char FormatChar )
1668 unsigned char FormatChar )
1670#define BASE_TYPE_UNMARSHALL(type) \
1671 align_pointer(&pStubMsg->Buffer, sizeof(type)); \
1672 TRACE("pMemory: %p\n", pMemory); \
1673 *(type *)pMemory = *(type *)pStubMsg->Buffer; \
1674 pStubMsg->Buffer += sizeof(type);
1735 FIXME(
"Unhandled base type: 0x%02x\n", FormatChar);
1737#undef BASE_TYPE_UNMARSHALL
1747 unsigned size = *(
const WORD*)(pFormat+2);
1765 unsigned char **ppMemory,
1767 unsigned char fMustAlloc)
1769 unsigned size = *(
const WORD*)(pFormat+2);
1770 unsigned char *saved_buffer;
1771 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
1779 if (!pStubMsg->
IsClient && !*ppMemory)
1781 *ppMemory = pStubMsg->
Buffer;
1789 TRACE(
"copying %p to %p\n", saved_buffer, *ppMemory);
1790 if (*ppMemory != saved_buffer)
1803 unsigned size = *(
const WORD*)(pFormat+2);
1819 unsigned short size = *(
const WORD *)(pFormat+2);
1821 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
1891 ERR(
"unknown array format 0x%x\n",
fc);
1907 esize = *(
const WORD*)(pFormat+2);
1922 esize = *(
const WORD*)(pFormat+2);
1963 ERR(
"unknown array format 0x%x\n",
fc);
1973 BOOL conformance_present;
2006 def = *(
const WORD *)(pFormat + 2);
2014 ERR(
"unknown array format 0x%x\n",
fc);
2030 esize = *(
const WORD*)(pFormat+2);
2046 esize = *(
const WORD*)(pFormat+2);
2090 ERR(
"unknown array format 0x%x\n",
fc);
2103 esize = *(
const WORD*)(pFormat+2);
2107 esize = *(
const WORD*)(pFormat+2);
2123 def = *(
const WORD *)(pFormat + 2);
2136 ERR(
"unknown array format 0x%x\n",
fc);
2144 unsigned char fUseBufferMemoryServer,
unsigned char fUnmarshall)
2149 unsigned char *saved_buffer, *
pMemory;
2155 esize = *(
const WORD*)(pFormat+2);
2170 if (fUseBufferMemoryServer && !pStubMsg->
IsClient && !*ppMemory)
2172 *ppMemory = pStubMsg->
Buffer;
2175 saved_buffer = pStubMsg->
Buffer;
2181 TRACE(
"copying %p to %p\n", saved_buffer, *ppMemory);
2182 if (*ppMemory != saved_buffer)
2187 esize = *(
const WORD*)(pFormat+2);
2203 if (!fMustAlloc && !*ppMemory)
2207 saved_buffer = pStubMsg->
Buffer;
2228 ERR(
"buffer size %d must equal memory size %ld for non-sized conformant strings\n",
2234 ERR(
"conformant strings can't have Offset (%d)\n", pStubMsg->
Offset);
2249 if (fUseBufferMemoryServer && !pStubMsg->
IsClient &&
2253 *ppMemory = pStubMsg->
Buffer;
2254 else if (!*ppMemory)
2258 if (*ppMemory == pStubMsg->
Buffer)
2280 if (!fMustAlloc && !*ppMemory)
2286 saved_buffer = pStubMsg->
Buffer;
2292 return pStubMsg->
Buffer - saved_buffer;
2295 ERR(
"unknown array format 0x%x\n",
fc);
2302 unsigned char fHasPointers)
2312 esize = *(
const WORD*)(pFormat+2);
2329 esize = *(
const WORD*)(pFormat+2);
2359 ERR(
"buffer size %d must equal memory size %ld for non-sized conformant strings\n",
2365 ERR(
"conformant strings can't have Offset (%d)\n", pStubMsg->
Offset);
2393 pStubMsg->
MemorySize = SavedMemorySize + memsize;
2396 ERR(
"unknown array format 0x%x\n",
fc);
2434 ERR(
"unknown array format 0x%x\n",
fc);
2462 TRACE(
"(pStubMsg == ^%p, pszMessage == ^%p, pFormat == ^%p)\n", pStubMsg, pszMessage, pFormat);
2465 ERR(
"Unhandled string type: %#x\n", pFormat[0]);
2492 TRACE(
"(pStubMsg == ^%p, pMemory == ^%p, pFormat == ^%p)\n", pStubMsg,
pMemory, pFormat);
2495 ERR(
"Unhandled string type: %#x\n", pFormat[0]);
2520 TRACE(
"(pStubMsg == ^%p, pFormat == ^%p)\n", pStubMsg, pFormat);
2523 ERR(
"Unhandled string type: %#x\n", pFormat[0]);
2546 unsigned char** ppMemory,
PFORMAT_STRING pFormat,
unsigned char fMustAlloc )
2548 TRACE(
"(pStubMsg == ^%p, *pMemory == ^%p, pFormat == ^%p, fMustAlloc == %u)\n",
2549 pStubMsg, *ppMemory, pFormat, fMustAlloc);
2552 ERR(
"Unhandled string type: %#x\n", *pFormat);
2561 pFormat, fMustAlloc,
2567 pFormat, fMustAlloc,
2584 TRACE(
"(pStubMsg == ^%p, pMemory == ^%p, pFormat == ^%p)\n", pStubMsg,
pMemory, pFormat);
2608 ERR(
"Unhandled string type: %#x\n", *pFormat);
2625 unsigned char **ppMemory,
2627 unsigned char fMustAlloc)
2631 TRACE(
"(pStubMsg == ^%p, *pMemory == ^%p, pFormat == ^%p, fMustAlloc == %u)\n",
2632 pStubMsg, *ppMemory, pFormat, fMustAlloc);
2639 ERR(
"non-conformant strings can't have Offset (%d)\n", pStubMsg->
Offset);
2647 ERR(
"Unhandled string type: %#x\n", *pFormat);
2656 if (!fMustAlloc && !*ppMemory)
2682 TRACE(
"(pStubMsg == ^%p, pMemory == ^%p, pFormat == ^%p)\n", pStubMsg,
pMemory, pFormat);
2708 ERR(
"Unhandled string type: %#x\n", *pFormat);
2723 TRACE(
"(pStubMsg == ^%p, pFormat == ^%p)\n", pStubMsg, pFormat);
2731 ERR(
"non-conformant strings can't have Offset (%d)\n", pStubMsg->
Offset);
2739 ERR(
"Unhandled string type: %#x\n", *pFormat);
2756#include "pshpack1.h"
2777 return *(
const WORD*)&pFormat[2];
2780 return *(
const ULONG*)&pFormat[2];
2782 return *(
const WORD*)&pFormat[4];
2784 switch (((
const NDR_RANGE *)pFormat)->flags_type & 0xf) {
2789 return sizeof(
UCHAR);
2797 return sizeof(
ULONG);
2799 return sizeof(
float);
2805 return sizeof(
UINT);
2807 ERR(
"unknown type 0x%x\n", ((
const NDR_RANGE *)pFormat)->flags_type & 0xf);
2814 pFormat += *(
const SHORT*)pFormat;
2815 return *(
const SHORT*)pFormat;
2817 return sizeof(
void *);
2819 return *(
const WORD*)&pFormat[2] * 2;
2821 FIXME(
"unhandled embedded type %02x\n", *pFormat);
2834 FIXME(
"no memorysizer for data type=%02x\n", *pFormat);
2838 return m(pStubMsg, pFormat);
2847 unsigned char *mem_base =
pMemory;
2852 while (*pFormat !=
FC_END) {
2916 unsigned char *saved_buffer;
2919 TRACE(
"pStubMsg->Buffer before %p\n", pStubMsg->
Buffer);
2922 if (*pPointer !=
FC_RP)
2924 saved_buffer = pStubMsg->
Buffer;
2929 pointer_buffer_mark_set =
TRUE;
2931 else if (*pPointer !=
FC_RP)
2934 if (pointer_buffer_mark_set)
2938 pStubMsg->
Buffer = saved_buffer;
2939 if (*pPointer !=
FC_RP)
2942 TRACE(
"pStubMsg->Buffer after %p\n", pStubMsg->
Buffer);
2971 desc = pFormat + *(
const SHORT*)pFormat;
2986 else FIXME(
"no marshaller for embedded type %02x\n", *
desc);
2993 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3005 unsigned char fMustAlloc)
3007 unsigned char *mem_base =
pMemory;
3012 while (*pFormat !=
FC_END) {
3086 unsigned char *saved_buffer;
3091 if (*pPointer !=
FC_RP)
3093 saved_buffer = pStubMsg->
Buffer;
3098 pointer_buffer_mark_set =
TRUE;
3100 else if (*pPointer !=
FC_RP)
3104 if (pointer_buffer_mark_set)
3108 pStubMsg->
Buffer = saved_buffer;
3109 if (*pPointer !=
FC_RP)
3141 desc = pFormat + *(
const SHORT*)pFormat;
3163 else FIXME(
"no unmarshaller for embedded type %02x\n", *
desc);
3170 FIXME(
"unhandled format %d\n", *pFormat);
3183 unsigned char *mem_base =
pMemory;
3188 while (*pFormat !=
FC_END) {
3237 ERR(
"BufferLength == 0??\n");
3242 if (*pPointer !=
FC_RP)
3274 desc = pFormat + *(
const SHORT*)pFormat;
3288 else FIXME(
"no buffersizer for embedded type %02x\n", *
desc);
3295 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3308 unsigned char *mem_base =
pMemory;
3313 while (*pFormat !=
FC_END) {
3376 desc = pFormat + *(
const SHORT*)pFormat;
3396 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3411 while (*pFormat !=
FC_END) {
3453 unsigned char *saved_buffer;
3457 if (*pPointer !=
FC_RP)
3459 saved_buffer = pStubMsg->
Buffer;
3464 pointer_buffer_mark_set =
TRUE;
3466 else if (*pPointer !=
FC_RP)
3471 if (pointer_buffer_mark_set)
3475 pStubMsg->
Buffer = saved_buffer;
3476 if (*pPointer !=
FC_RP)
3483 size +=
sizeof(
void *);
3507 desc = pFormat + *(
const SHORT*)pFormat;
3514 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3527 while (*pFormat !=
FC_END) {
3560 size +=
sizeof(
void *);
3585 desc = pFormat + *(
const SHORT*)pFormat;
3592 FIXME(
"unhandled format 0x%02x\n", *pFormat);
3609 unsigned char *OldMemory = pStubMsg->
Memory;
3633 pointer_buffer_mark_set =
TRUE;
3642 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3644 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3653 pMemory + struct_size, conf_array);
3671 pStubMsg->
Memory = OldMemory;
3673 if (pointer_buffer_mark_set)
3688 unsigned char **ppMemory,
3690 unsigned char fMustAlloc)
3692 unsigned size = *(
const WORD*)(pFormat+2);
3702 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
3708 unsigned char *saved_buffer = pStubMsg->
Buffer;
3719 pointer_buffer_mark_set =
TRUE;
3722 pStubMsg->
Buffer = saved_buffer;
3728 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3730 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3744 if (!fMustAlloc && !*ppMemory)
3764 if (pointer_buffer_mark_set)
3782 unsigned char *OldMemory = pStubMsg->
Memory;
3783 int pointer_length_set = 0;
3805 pointer_length_set = 1;
3813 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3815 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3843 pStubMsg->
Memory = OldMemory;
3845 if(pointer_length_set)
3859 unsigned size = *(
const WORD*)(pFormat+2);
3866 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
3871 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3873 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3910 unsigned char *OldMemory = pStubMsg->
Memory;
3915 if (*(
const SHORT*)pFormat) conf_array = pFormat + *(
const SHORT*)pFormat;
3917 if (*(
const WORD*)pFormat) pointer_desc = pFormat + *(
const WORD*)pFormat;
3928 pStubMsg->
Memory = OldMemory;
3941 ERR(
"invalid format = 0x%x\n", pFormat[0]);
3957 unsigned char **ppMemory,
3959 unsigned char fMustAlloc)
3961 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
3964 ERR(
"invalid format = 0x%x\n", pFormat[0]);
3987 ERR(
"invalid format = 0x%x\n", pFormat[0]);
4002 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
4005 ERR(
"invalid format = 0x%x\n", pFormat[0]);
4025 ERR(
"invalid format = 0x%x\n", pFormat[0]);
4045 ERR(
"invalid format type %x\n", pFormat[0]);
4063 unsigned char** ppMemory,
4065 unsigned char fMustAlloc )
4067 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4071 ERR(
"invalid format type %x\n", pFormat[0]);
4078 pFormat, fMustAlloc,
4097 ERR(
"invalid format type %x\n", pFormat[0]);
4117 ERR(
"invalid format type %x\n", pFormat[0]);
4135 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
4139 ERR(
"invalid format type %x\n", pFormat[0]);
4165 ERR(
"invalid format type %x\n", pFormat[0]);
4190 pointer_buffer_mark_set =
TRUE;
4194 pStubMsg->
Offset = saved_offset;
4195 pStubMsg->
MaxCount = saved_max_count;
4205 if (pointer_buffer_mark_set)
4218 unsigned char **ppMemory,
4220 unsigned char fMustAlloc)
4222 unsigned char *saved_buffer;
4224 int saved_ignore_embedded;
4226 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4230 ERR(
"invalid format type %x\n", pFormat[0]);
4237 saved_buffer = pStubMsg->
Buffer;
4250 pointer_buffer_mark_set =
TRUE;
4253 pStubMsg->
Buffer = saved_buffer;
4259 if (pointer_buffer_mark_set)
4275 int pointer_length_set = 0;
4281 ERR(
"invalid format type %x\n", pFormat[0]);
4304 pointer_length_set = 1;
4308 pStubMsg->
Offset = saved_offset;
4309 pStubMsg->
MaxCount = saved_max_count;
4316 if(pointer_length_set)
4329 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
4333 ERR(
"invalid format type %x\n", pFormat[0]);
4356 ERR(
"invalid format type %x\n", pFormat[0]);
4361 def = *(
const WORD*)&pFormat[2];
4389#define USER_MARSHAL_PTR_PREFIX \
4390 ( (DWORD)'U' | ( (DWORD)'s' << 8 ) | \
4391 ( (DWORD)'e' << 16 ) | ( (DWORD)'r' << 24 ) )
4400 unsigned flags = pFormat[1];
4401 unsigned index = *(
const WORD*)&pFormat[2];
4402 unsigned char *saved_buffer =
NULL;
4417 saved_buffer = pStubMsg->
Buffer;
4427 pStubMsg->
StubDesc->aUserMarshalQuadruple[
index].pfnMarshall(
4434 pStubMsg->
Buffer = saved_buffer;
4446 unsigned char **ppMemory,
4448 unsigned char fMustAlloc)
4450 unsigned flags = pFormat[1];
4451 unsigned index = *(
const WORD*)&pFormat[2];
4452 DWORD memsize = *(
const WORD*)&pFormat[4];
4453 unsigned char *saved_buffer =
NULL;
4456 TRACE(
"(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4468 saved_buffer = pStubMsg->
Buffer;
4477 if (!fMustAlloc && !*ppMemory)
4482 memset(*ppMemory, 0, memsize);
4486 pStubMsg->
StubDesc->aUserMarshalQuadruple[
index].pfnUnmarshall(
4493 pStubMsg->
Buffer = saved_buffer;
4506 unsigned flags = pFormat[1];
4507 unsigned index = *(
const WORD*)&pFormat[2];
4510 ULONG saved_buffer_length = 0;
4541 pStubMsg->
StubDesc->aUserMarshalQuadruple[
index].pfnBufferSize(
4544 if (saved_buffer_length)
4558 unsigned flags = pFormat[1];
4559 unsigned index = *(
const WORD*)&pFormat[2];
4560 DWORD memsize = *(
const WORD*)&pFormat[4];
4563 TRACE(
"(%p,%p)\n", pStubMsg, pFormat);
4581 FIXME(
"not implemented for varying buffer size\n");
4596 unsigned index = *(
const WORD*)&pFormat[2];
4638 (
unsigned char *)
msg->Buffer +
msg->BufferLength;
4652 WARN(
"unrecognised CBType %d\n", umcb->
CBType);
4665 FIXME(
"(%p,%p,%p): stub\n", pStubMsg, pFormat, ArgAddr);
4673 FIXME(
"(pStubMsg == ^%p, pFormat == ^%p): stub.\n", pStubMsg, pFormat);
4683 FIXME(
"(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %d): stub.\n",
4684 pStubMsg, pFormat, NumberParams);
4689#include "pshpack1.h"
4715 ERR(
"invalid format type %x\n", pCStructFormat->
type);
4724 ERR(
"invalid array format type %x\n", pCStructFormat->
type);
4728 esize = *(
const WORD*)(pCArrayFormat+2);
4731 pCArrayFormat + 4, 0);
4740 if (pCStructFormat->
memory_size + bufsize < pCStructFormat->memory_size)
4742 ERR(
"integer overflow of memory_size %u with bufsize %u\n",
4760 unsigned char **ppMemory,
4762 unsigned char fMustAlloc)
4767 unsigned char *saved_buffer;
4769 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4774 ERR(
"invalid format type %x\n", pCStructFormat->
type);
4782 ERR(
"invalid array format type %x\n", pCStructFormat->
type);
4786 esize = *(
const WORD*)(pCArrayFormat+2);
4795 if (pCStructFormat->
memory_size + bufsize < pCStructFormat->memory_size)
4797 ERR(
"integer overflow of memory_size %u with bufsize %u\n",
4809 if (!pStubMsg->
IsClient && !*ppMemory)
4811 *ppMemory = pStubMsg->
Buffer;
4819 TRACE(
"copying %p to %p\n", saved_buffer, *ppMemory);
4820 if (*ppMemory != saved_buffer)
4842 ERR(
"invalid format type %x\n", pCStructFormat->
type);
4850 ERR(
"invalid array format type %x\n", pCStructFormat->
type);
4854 esize = *(
const WORD*)(pCArrayFormat+2);
4895 ERR(
"invalid format type %x\n", pCStructFormat->
type);
4904 ERR(
"invalid array format type %x\n", pCStructFormat->
type);
4910 pCArrayFormat + 4, 0);
4936 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
4958 pCVArrayFormat,
FALSE );
4969 unsigned char **ppMemory,
4971 unsigned char fMustAlloc)
4976 unsigned char *saved_buffer, *saved_array_buffer;
4978 unsigned char *array_memory;
4980 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
4985 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
5001 if (!fMustAlloc && !*ppMemory)
5013 array_memory = *ppMemory + pCVStructFormat->
memory_size;
5015 &array_memory, pCVArrayFormat,
5024 saved_array_buffer = pStubMsg->
Buffer;
5032 TRACE(
"copying %p to %p\n", saved_array_buffer, *ppMemory + pCVStructFormat->
memory_size);
5059 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
5092 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
5097 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
5136 ERR(
"invalid format type %x\n", pCVStructFormat->
type);
5152#include "pshpack1.h"
5183 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5193 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5199 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5214 unsigned char **ppMemory,
5216 unsigned char fMustAlloc)
5220 unsigned char *saved_buffer;
5222 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
5227 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5237 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5243 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5250 if (!pStubMsg->
IsClient && !*ppMemory)
5252 *ppMemory = pStubMsg->
Buffer;
5259 TRACE(
"copying %p to %p\n", saved_buffer, *ppMemory);
5260 if (*ppMemory != saved_buffer)
5261 memcpy(*ppMemory, saved_buffer, total_size);
5281 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5291 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5297 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5313 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
5318 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5328 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5334 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5359 ERR(
"invalid format type %x\n", pSmFArrayFormat->
type);
5365 pFormat = (
const unsigned char *)(pSmFArrayFormat + 1);
5369 pFormat = (
const unsigned char *)(pLgFArrayFormat + 1);
5383 DWORD elements, esize;
5391 ERR(
"invalid format type %x\n", pFormat[0]);
5401 pFormat +=
sizeof(
WORD);
5402 elements = *(
const WORD*)pFormat;
5403 pFormat +=
sizeof(
WORD);
5408 pFormat +=
sizeof(
DWORD);
5409 elements = *(
const DWORD*)pFormat;
5410 pFormat +=
sizeof(
DWORD);
5413 esize = *(
const WORD*)pFormat;
5414 pFormat +=
sizeof(
WORD);
5441 unsigned char **ppMemory,
5443 unsigned char fMustAlloc)
5448 unsigned char *saved_buffer;
5451 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
5456 ERR(
"invalid format type %x\n", pFormat[0]);
5467 pFormat +=
sizeof(
WORD);
5468 elements = *(
const WORD*)pFormat;
5469 pFormat +=
sizeof(
WORD);
5475 pFormat +=
sizeof(
DWORD);
5476 elements = *(
const DWORD*)pFormat;
5477 pFormat +=
sizeof(
DWORD);
5480 esize = *(
const WORD*)pFormat;
5481 pFormat +=
sizeof(
WORD);
5490 if (!fMustAlloc && !*ppMemory)
5512 DWORD elements, esize;
5519 ERR(
"invalid format type %x\n", pFormat[0]);
5529 pFormat +=
sizeof(
WORD);
5530 elements = *(
const WORD*)pFormat;
5531 pFormat +=
sizeof(
WORD);
5536 pFormat +=
sizeof(
DWORD);
5537 elements = *(
const DWORD*)pFormat;
5538 pFormat +=
sizeof(
DWORD);
5541 esize = *(
const WORD*)pFormat;
5542 pFormat +=
sizeof(
WORD);
5570 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
5575 ERR(
"invalid format type %x\n", pFormat[0]);
5586 pFormat +=
sizeof(
WORD);
5587 elements = *(
const WORD*)pFormat;
5588 pFormat +=
sizeof(
WORD);
5594 pFormat +=
sizeof(
DWORD);
5595 elements = *(
const DWORD*)pFormat;
5596 pFormat +=
sizeof(
DWORD);
5599 esize = *(
const WORD*)pFormat;
5600 pFormat +=
sizeof(
WORD);
5628 ERR(
"invalid format type %x\n", pFormat[0]);
5636 pFormat +=
sizeof(
WORD);
5637 elements = *(
const WORD*)pFormat;
5638 pFormat +=
sizeof(
WORD);
5643 pFormat +=
sizeof(
DWORD);
5644 elements = *(
const DWORD*)pFormat;
5645 pFormat +=
sizeof(
DWORD);
5648 pFormat +=
sizeof(
WORD);
5680 FIXME(
"Unhandled base type: 0x%02x\n",
fc);
5689 unsigned short num_arms,
arm,
type;
5691 num_arms = *(
const SHORT*)pFormat & 0x0fff;
5695 if(discriminant == *(
const ULONG*)pFormat)
5703 type = *(
const unsigned short*)pFormat;
5709 ERR(
"no arm for 0x%x and no default case\n", discriminant);
5715 TRACE(
"falling back to empty default case for 0x%x\n", discriminant);
5724 unsigned short type;
5732 type = *(
const unsigned short*)pFormat;
5733 if((
type & 0xff00) == 0x8000)
5744 unsigned char *saved_buffer =
NULL;
5753 saved_buffer = pStubMsg->
Buffer;
5758 pointer_buffer_mark_set =
TRUE;
5764 if (pointer_buffer_mark_set)
5770 ERR(
"buffer overflow - saved_buffer = %p, BufferEnd = %p\n",
5774 pStubMsg->
Buffer = saved_buffer + 4;
5786 FIXME(
"no marshaller for embedded type %02x\n", *
desc);
5792 unsigned char **ppMemory,
5795 unsigned char fMustAlloc)
5797 unsigned short type;
5805 type = *(
const unsigned short*)pFormat;
5806 if((
type & 0xff00) == 0x8000)
5817 unsigned char *saved_buffer =
NULL;
5826 saved_buffer = pStubMsg->
Buffer;
5831 pointer_buffer_mark_set =
TRUE;
5836 if (saved_buffer + 4 > pStubMsg->
BufferEnd)
5838 ERR(
"buffer overflow - saved_buffer = %p, BufferEnd = %p\n",
5843 PointerUnmarshall(pStubMsg, saved_buffer, *(
unsigned char ***)ppMemory, **(
unsigned char ***)ppMemory,
desc, fMustAlloc);
5844 if (pointer_buffer_mark_set)
5848 pStubMsg->
Buffer = saved_buffer + 4;
5853 m(pStubMsg, *(
unsigned char ***)ppMemory,
desc, fMustAlloc);
5856 m(pStubMsg, ppMemory,
desc, fMustAlloc);
5860 FIXME(
"no marshaller for embedded type %02x\n", *
desc);
5870 unsigned short type;
5878 type = *(
const unsigned short*)pFormat;
5879 if((
type & 0xff00) == 0x8000)
5904 ERR(
"BufferLength == 0??\n");
5919 FIXME(
"no buffersizer for embedded type %02x\n", *
desc);
5929 size = *(
const unsigned short*)pFormat;
5937 type = *(
const unsigned short*)pFormat;
5938 if((
type & 0xff00) == 0x8000)
5946 unsigned char *saved_buffer;
5956 saved_buffer = pStubMsg->
Buffer;
5964 return m(pStubMsg,
desc);
5968 FIXME(
"no marshaller for embedded type %02x\n", *
desc);
5980 unsigned short type;
5988 type = *(
const unsigned short*)pFormat;
5989 if((
type & 0xff00) != 0x8000)
6021 unsigned char switch_type;
6022 unsigned char increment;
6028 switch_type = *pFormat & 0xf;
6029 increment = (*pFormat & 0xf0) >> 4;
6035 TRACE(
"got switch value 0x%x\n", switch_value);
6047 unsigned char **ppMemory,
6049 unsigned char fMustAlloc)
6051 unsigned char switch_type;
6052 unsigned char increment;
6054 unsigned short size;
6055 unsigned char *pMemoryArm;
6057 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
6060 switch_type = *pFormat & 0xf;
6061 increment = (*pFormat & 0xf0) >> 4;
6066 TRACE(
"got switch value 0x%x\n", switch_value);
6068 size = *(
const unsigned short*)pFormat + increment;
6069 if (!fMustAlloc && !*ppMemory)
6083 pMemoryArm = *ppMemory + increment;
6095 unsigned char switch_type;
6096 unsigned char increment;
6102 switch_type = *pFormat & 0xf;
6103 increment = (*pFormat & 0xf0) >> 4;
6108 TRACE(
"got switch value 0x%x\n", switch_value);
6123 unsigned char switch_type;
6124 unsigned char increment;
6127 switch_type = *pFormat & 0xf;
6128 increment = (*pFormat & 0xf0) >> 4;
6133 TRACE(
"got switch value 0x%x\n", switch_value);
6135 pStubMsg->
Memory += increment;
6147 unsigned char switch_type;
6148 unsigned char increment;
6154 switch_type = *pFormat & 0xf;
6155 increment = (*pFormat & 0xf0) >> 4;
6159 TRACE(
"got switch value 0x%x\n", switch_value);
6173 unsigned char switch_type;
6178 switch_type = *pFormat;
6192 LONG discriminant = 0;
6227 FIXME(
"Unhandled base type: 0x%02x\n", **ppFormat);
6232 return discriminant;
6239 unsigned char **ppMemory,
6241 unsigned char fMustAlloc)
6244 unsigned short size;
6246 TRACE(
"(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
6251 TRACE(
"unmarshalled discriminant %x\n", discriminant);
6253 pFormat += *(
const SHORT*)pFormat;
6255 size = *(
const unsigned short*)pFormat;
6257 if (!fMustAlloc && !*ppMemory)
6280 unsigned char switch_type;
6285 switch_type = *pFormat;
6307 TRACE(
"unmarshalled discriminant 0x%x\n", discriminant);
6344 unsigned char **ppMemory,
6346 unsigned char fMustAlloc)
6397 unsigned char **ppMemory,
6399 unsigned char fMustAlloc)
6444 unsigned char base_type;
6446 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6450 ERR(
"invalid format type %x\n", pRange->
type);
6465 unsigned char **ppMemory,
6467 unsigned char fMustAlloc)
6470 unsigned char base_type;
6472 TRACE(
"pStubMsg: %p, ppMemory: %p, type: 0x%02x, fMustAlloc: %s\n", pStubMsg, ppMemory, *pFormat, fMustAlloc ?
"true" :
"false");
6476 ERR(
"invalid format type %x\n", pRange->
type);
6482 TRACE(
"base_type = 0x%02x, low_value = %d, high_value = %d\n",
6485#define RANGE_UNMARSHALL(mem_type, wire_type, format_spec) \
6488 align_pointer(&pStubMsg->Buffer, sizeof(wire_type)); \
6489 if (!fMustAlloc && !*ppMemory) \
6490 fMustAlloc = TRUE; \
6492 *ppMemory = NdrAllocate(pStubMsg, sizeof(mem_type)); \
6493 if (pStubMsg->Buffer + sizeof(wire_type) > pStubMsg->BufferEnd) \
6495 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n", \
6496 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength); \
6497 RpcRaiseException(RPC_X_BAD_STUB_DATA); \
6499 if ((*(wire_type *)pStubMsg->Buffer < (mem_type)pRange->low_value) || \
6500 (*(wire_type *)pStubMsg->Buffer > (mem_type)pRange->high_value)) \
6502 ERR("value exceeded bounds: " format_spec ", low: " format_spec ", high: " format_spec "\n", \
6503 *(wire_type *)pStubMsg->Buffer, (mem_type)pRange->low_value, \
6504 (mem_type)pRange->high_value); \
6505 RpcRaiseException(RPC_S_INVALID_BOUND); \
6508 TRACE("*ppMemory: %p\n", *ppMemory); \
6509 **(mem_type **)ppMemory = *(wire_type *)pStubMsg->Buffer; \
6510 pStubMsg->Buffer += sizeof(wire_type); \
6518 TRACE(
"value: 0x%02x\n", **ppMemory);
6523 TRACE(
"value: 0x%02x\n", **ppMemory);
6537 TRACE(
"value: 0x%08x\n", **(
ULONG **)ppMemory);
6541 TRACE(
"value: 0x%08x\n", **(
ULONG **)ppMemory);
6545 TRACE(
"value: 0x%08x\n", **(
UINT **)ppMemory);
6551 ERR(
"invalid range base type: 0x%02x\n", base_type);
6567 unsigned char base_type;
6569 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6573 ERR(
"invalid format type %x\n", pRange->
type);
6589 unsigned char base_type;
6593 ERR(
"invalid format type %x\n", pRange->
type);
6609 TRACE(
"pStubMsg %p pMemory %p type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6622 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6683 FIXME(
"Unhandled base type: 0x%02x\n", *pFormat);
6695 unsigned char **ppMemory,
6697 unsigned char fMustAlloc)
6699 TRACE(
"pStubMsg: %p, ppMemory: %p, type: 0x%02x, fMustAlloc: %s\n", pStubMsg, ppMemory, *pFormat, fMustAlloc ?
"true" :
"false");
6701#define BASE_TYPE_UNMARSHALL(type) do { \
6702 align_pointer(&pStubMsg->Buffer, sizeof(type)); \
6703 if (!fMustAlloc && !pStubMsg->IsClient && !*ppMemory) \
6705 *ppMemory = pStubMsg->Buffer; \
6706 TRACE("*ppMemory: %p\n", *ppMemory); \
6707 safe_buffer_increment(pStubMsg, sizeof(type)); \
6712 *ppMemory = NdrAllocate(pStubMsg, sizeof(type)); \
6713 TRACE("*ppMemory: %p\n", *ppMemory); \
6714 safe_copy_from_buffer(pStubMsg, *ppMemory, sizeof(type)); \
6725 TRACE(
"value: 0x%02x\n", **ppMemory);
6738 TRACE(
"value: 0x%08x\n", **(
ULONG **)ppMemory);
6742 TRACE(
"value: %f\n", **(
float **)ppMemory);
6746 TRACE(
"value: %f\n", **(
double **)ppMemory);
6756 if (!fMustAlloc && !*ppMemory)
6763 TRACE(
"value: 0x%08x\n", **(
UINT **)ppMemory);
6772 if (!fMustAlloc && !*ppMemory)
6787 if (!fMustAlloc && !*ppMemory)
6799 FIXME(
"Unhandled base type: 0x%02x\n", *pFormat);
6801#undef BASE_TYPE_UNMARSHALL
6816 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6860 FIXME(
"Unhandled base type: 0x%02x\n", *pFormat);
6871 TRACE(
"pStubMsg %p, type 0x%02x\n", pStubMsg, *pFormat);
6881 return sizeof(
UCHAR);
6897 return sizeof(
ULONG);
6903 return sizeof(
float);
6927 return sizeof(
UINT);
6938 return sizeof(
void *);
6940 FIXME(
"Unhandled base type: 0x%02x\n", *pFormat);
6952 TRACE(
"pStubMsg %p pMemory %p type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6965 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6969 ERR(
"invalid format type %x\n", *pFormat);
6984 TRACE(
"pStubMsg %p, pMemory %p, type 0x%02x\n", pStubMsg,
pMemory, *pFormat);
6988 ERR(
"invalid format type %x\n", *pFormat);
6991 TRACE(
"flags: 0x%02x\n", pFormat[1]);
7015 unsigned char **ppMemory,
7017 unsigned char fMustAlloc)
7019 TRACE(
"pStubMsg %p, ppMemory %p, pFormat %p, fMustAlloc %s\n", pStubMsg,
7020 ppMemory, pFormat, fMustAlloc ?
"TRUE":
"FALSE");
7024 ERR(
"invalid format type %x\n", *pFormat);
7027 TRACE(
"flags: 0x%02x\n", pFormat[1]);
7061 TRACE(
"(%p, %p, %d)\n", pStubMsg, ContextHandle, fCheck);
7067 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7086 TRACE(
"(%p, %p, %p)\n", pStubMsg, pContextHandle, BindHandle);
7105 TRACE(
"(%p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine);
7111 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7126 TRACE(
"(%p)\n", pStubMsg);
7132 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7143 return ContextHandle;
7150 FIXME(
"(%p, %p, %p): stub\n", pStubMsg,
pMemory, pFormat);
7159 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
7184 TRACE(
"(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat);
7190 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7217 TRACE(
"(%p, %p)\n", pStubMsg, pFormat);
7223 ERR(
"buffer overflow - Buffer = %p, BufferEnd = %p\n",
7244 return ContextHandle;
7287 FIXME(
"(%p): stub\n", pStubMsg);
7307 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)
const NDR_MEMORYSIZE NdrMemorySizer[NDR_TABLE_SIZE]
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)
const NDR_FREE NdrFreer[NDR_TABLE_SIZE]
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)
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)
const NDR_UNMARSHALL NdrUnmarshaller[NDR_TABLE_SIZE]
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)
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)
const NDR_BUFFERSIZE NdrBufferSizer[NDR_TABLE_SIZE]
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)
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)
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)
static const WCHAR 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
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