Mike Hearn wrote:
This corrects an attempt to demarshal garbage during InstallShield10 startup. For full InstallShield 10 support we need a stdole2.tlb
Mike Hearn <mh(a)codeweavers.com> Correctly marshal NULL ppUnk refptrs in NdrPointerMarshall
Index: dlls/rpcrt4/ndr_marshall.c =================================================================== RCS file: /home/wine/wine/dlls/rpcrt4/ndr_marshall.c,v retrieving revision 1.24 diff -u -p -d -u -r1.24 ndr_marshall.c --- dlls/rpcrt4/ndr_marshall.c 1 Jun 2005 11:04:03 -0000 1.24 +++ dlls/rpcrt4/ndr_marshall.c 5 Jun 2005 22:03:11 -0000 @@ -575,19 +575,19 @@ void WINAPI PointerMarshall(PMIDL_STUB_M TRACE("(%p,%p,%p,%p)\n", pStubMsg, Buffer, Pointer, pFormat); TRACE("type=0x%x, attr=", type); dump_pointer_attr(attr); pFormat += 2; + if (attr & RPC_FC_P_SIMPLEPOINTER) desc = pFormat; else desc = pFormat + *(const SHORT*)pFormat; + if (attr & RPC_FC_P_DEREF) { + if (!Pointer) + RpcRaiseException(RPC_X_NULL_REF_POINTER); Pointer = *(unsigned char**)Pointer; TRACE("deref => %p\n", Pointer); }
switch (type) { - case RPC_FC_RP: /* ref pointer (always non-null) */ -#if 0 /* this causes problems for InstallShield so is disabled - we need more tests */ - if (!Pointer) - RpcRaiseException(RPC_X_NULL_REF_POINTER); -#endif + case RPC_FC_RP: /* ref pointer (always non-null but may point to null) */ break; case RPC_FC_UP: /* unique pointer */ case RPC_FC_OP: /* object pointer - same as unique here */
This looks wrong. A ref pointer shouldn't be treated as a unique pointer in any circumstances AFAIK. I'll add this case to my mini test suite to confirm or deny this hypothesis. -- Rob Shearman