Use I_RpcGetBuffer instead of HeapReAlloc for getting the Buffer
memory.
This commit is contained in:
parent
2c6c67f4ea
commit
5ef4748c7c
|
@ -1979,7 +1979,8 @@ TMStubImpl_Invoke(
|
||||||
|
|
||||||
memset(&buf,0,sizeof(buf));
|
memset(&buf,0,sizeof(buf));
|
||||||
buf.size = xmsg->cbBuffer;
|
buf.size = xmsg->cbBuffer;
|
||||||
buf.base = xmsg->Buffer;
|
buf.base = HeapAlloc(GetProcessHeap(), 0, xmsg->cbBuffer);
|
||||||
|
memcpy(buf.base, xmsg->Buffer, xmsg->cbBuffer);
|
||||||
buf.curoff = 0;
|
buf.curoff = 0;
|
||||||
buf.iid = IID_IUnknown;
|
buf.iid = IID_IUnknown;
|
||||||
|
|
||||||
|
@ -2173,9 +2174,9 @@ afterserialize:
|
||||||
if (hres != S_OK)
|
if (hres != S_OK)
|
||||||
return hres;
|
return hres;
|
||||||
|
|
||||||
/* might need to use IRpcChannelBuffer_GetBuffer ? */
|
|
||||||
xmsg->cbBuffer = buf.curoff;
|
xmsg->cbBuffer = buf.curoff;
|
||||||
xmsg->Buffer = buf.base;
|
I_RpcGetBuffer((RPC_MESSAGE *)xmsg);
|
||||||
|
memcpy(xmsg->Buffer, buf.base, buf.curoff);
|
||||||
HeapFree(GetProcessHeap(),0,args);
|
HeapFree(GetProcessHeap(),0,args);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue