rpcrt4: Add support for calculating the memory size of complex types with embedded non-conformant strings.

This commit is contained in:
Rob Shearman 2008-01-13 20:52:54 +00:00 committed by Alexandre Julliard
parent 576c9dc6fa
commit 97b842c817
1 changed files with 3 additions and 0 deletions

View File

@ -2126,6 +2126,7 @@ static unsigned long EmbeddedComplexSize(const MIDL_STUB_MESSAGE *pStubMsg,
case RPC_FC_BOGUS_STRUCT: case RPC_FC_BOGUS_STRUCT:
case RPC_FC_SMFARRAY: case RPC_FC_SMFARRAY:
case RPC_FC_SMVARRAY: case RPC_FC_SMVARRAY:
case RPC_FC_CSTRING:
return *(const WORD*)&pFormat[2]; return *(const WORD*)&pFormat[2];
case RPC_FC_USER_MARSHAL: case RPC_FC_USER_MARSHAL:
return *(const WORD*)&pFormat[4]; return *(const WORD*)&pFormat[4];
@ -2140,6 +2141,8 @@ static unsigned long EmbeddedComplexSize(const MIDL_STUB_MESSAGE *pStubMsg,
return *(const SHORT*)pFormat; return *(const SHORT*)pFormat;
case RPC_FC_IP: case RPC_FC_IP:
return sizeof(void *); return sizeof(void *);
case RPC_FC_WSTRING:
return *(const WORD*)&pFormat[2] * 2;
default: default:
FIXME("unhandled embedded type %02x\n", *pFormat); FIXME("unhandled embedded type %02x\n", *pFormat);
} }