Implement RPC_E_DISCONNECTED in proxies.

This commit is contained in:
Robert Shearman 2004-12-14 11:44:11 +00:00 committed by Alexandre Julliard
parent fa5c73f1cf
commit 67942791e2
2 changed files with 14 additions and 0 deletions

View File

@ -1185,6 +1185,13 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
return E_FAIL;
}
if (!tpinfo->chanbuf)
{
WARN("Tried to use disconnected proxy\n");
LeaveCriticalSection(&tpinfo->crit);
return RPC_E_DISCONNECTED;
}
if (relaydeb) {
TRACE_(olerelay)("->");
if (iname)

View File

@ -100,6 +100,13 @@ void WINAPI NdrProxySendReceive(void *This,
HRESULT hr;
TRACE("(%p,%p)\n", This, pStubMsg);
if (!pStubMsg->pRpcChannelBuffer)
{
WARN("Trying to use disconnected proxy %p\n", This);
RpcRaiseException(RPC_E_DISCONNECTED);
}
pStubMsg->dwStubPhase = PROXY_SENDRECEIVE;
hr = IRpcChannelBuffer_SendReceive(pStubMsg->pRpcChannelBuffer,
(RPCOLEMESSAGE*)pStubMsg->RpcMsg,