Commit 44d6e39c authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Make typelib marshaler use IRpcChannelBuffer::GetBuffer if possible.

parent 80c31a9c
......@@ -2214,11 +2214,34 @@ afterserialize:
return hres;
ITypeInfo_Release(tinfo);
HeapFree(GetProcessHeap(), 0, args);
xmsg->cbBuffer = buf.curoff;
I_RpcGetBuffer((RPC_MESSAGE *)xmsg);
memcpy(xmsg->Buffer, buf.base, buf.curoff);
HeapFree(GetProcessHeap(),0,args);
return S_OK;
if (rpcchanbuf)
{
hres = IRpcChannelBuffer_GetBuffer(rpcchanbuf, xmsg, &This->iid);
if (hres != S_OK)
ERR("IRpcChannelBuffer_GetBuffer failed with error 0x%08lx\n", hres);
}
else
{
/* FIXME: remove this case when we start sending an IRpcChannelBuffer
* object with builtin OLE */
RPC_STATUS status = I_RpcGetBuffer((RPC_MESSAGE *)xmsg);
if (status != RPC_S_OK)
{
ERR("I_RpcGetBuffer failed with error %ld\n", status);
hres = E_FAIL;
}
}
if (hres == S_OK)
memcpy(xmsg->Buffer, buf.base, buf.curoff);
HeapFree(GetProcessHeap(), 0, buf.base);
TRACE("returning\n");
return hres;
}
static LPRPCSTUBBUFFER WINAPI
......@@ -2231,6 +2254,7 @@ static ULONG WINAPI
TMStubImpl_CountRefs(LPRPCSTUBBUFFER iface) {
TMStubImpl *This = (TMStubImpl *)iface;
FIXME("()\n");
return This->ref; /*FIXME? */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment