From 5616c4150c0ab97d5ecba67935fd86e492a5f48b Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Wed, 10 May 2006 13:12:20 +0100 Subject: [PATCH] rpcrt4: Rename NonEncapsulatedUnionSize to NdrNonEncapsulatedUnionMemorySize. --- dlls/rpcrt4/ndr_marshall.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 836b6ca1ca..ac38bcebee 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -1427,20 +1427,6 @@ void WINAPI NdrSimpleStructFree(PMIDL_STUB_MESSAGE pStubMsg, } -static long NonEncapsulatedUnionSize(PMIDL_STUB_MESSAGE pStubMsg, - PFORMAT_STRING pFormat) -{ - pFormat += 2; - if (pStubMsg->fHasNewCorrDesc) - pFormat += 6; - else - pFormat += 4; - - pFormat += *(const SHORT*)pFormat; - TRACE("size %d\n", *(const SHORT*)pFormat); - return *(const SHORT*)pFormat; -} - unsigned long WINAPI EmbeddedComplexSize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat) { @@ -1453,7 +1439,7 @@ unsigned long WINAPI EmbeddedComplexSize(PMIDL_STUB_MESSAGE pStubMsg, case RPC_FC_USER_MARSHAL: return *(const WORD*)&pFormat[4]; case RPC_FC_NON_ENCAPSULATED_UNION: - return NonEncapsulatedUnionSize(pStubMsg, pFormat); + return NdrNonEncapsulatedUnionMemorySize(pStubMsg, pFormat); default: FIXME("unhandled embedded type %02x\n", *pFormat); } @@ -3109,8 +3095,15 @@ void WINAPI NdrNonEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned long WINAPI NdrNonEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat) { - FIXME("stub\n"); - return 0; + pFormat += 2; + if (pStubMsg->fHasNewCorrDesc) + pFormat += 6; + else + pFormat += 4; + + pFormat += *(const SHORT*)pFormat; + TRACE("size %d\n", *(const SHORT*)pFormat); + return *(const SHORT*)pFormat; } /*********************************************************************** -- 2.32.0.93.g670b81a890