Author: cwittich Date: Fri Jan 18 14:38:47 2008 New Revision: 31859
URL: http://svn.reactos.org/svn/reactos?rev=31859&view=rev Log: Rob Shearman : rpcrt4: Handle complex arrays in calc_arg_size. <rob at codeweavers.com>
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c trunk/reactos/dll/win32/rpcrt4/ndr_misc.h trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_marsha... ============================================================================== --- trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c (original) +++ trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c Fri Jan 18 14:38:47 2008 @@ -2655,8 +2655,8 @@ return size; }
-static unsigned long ComplexStructSize(PMIDL_STUB_MESSAGE pStubMsg, - PFORMAT_STRING pFormat) +unsigned long ComplexStructSize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) { PFORMAT_STRING desc; unsigned long size = 0;
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_misc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_misc.h... ============================================================================== --- trunk/reactos/dll/win32/rpcrt4/ndr_misc.h (original) +++ trunk/reactos/dll/win32/rpcrt4/ndr_misc.h Fri Jan 18 14:38:47 2008 @@ -62,4 +62,6 @@ extern const NDR_MEMORYSIZE NdrMemorySizer[]; extern const NDR_FREE NdrFreer[];
+unsigned long ComplexStructSize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat); + #endif /* __WINE_NDR_MISC_H */
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_stuble... ============================================================================== --- trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c (original) +++ trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c Fri Jan 18 14:38:47 2008 @@ -849,6 +849,12 @@ case RPC_FC_LGFARRAY: size = *(const DWORD*)(pFormat + 2); break; + case RPC_FC_BOGUS_ARRAY: + pFormat = ComputeConformance(pStubMsg, NULL, pFormat + 4, *(const WORD*)&pFormat[2]); + TRACE("conformance = %ld\n", pStubMsg->MaxCount); + pFormat = ComputeVariance(pStubMsg, NULL, pFormat, pStubMsg->MaxCount); + size = ComplexStructSize(pStubMsg, pFormat); + size *= pStubMsg->MaxCount; default: FIXME("Unhandled type %02x\n", *pFormat); /* fallthrough */