Commit f9fc52f6 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Pass the interface identifier to the lower-level context handle routines…

rpcrt4: Pass the interface identifier to the lower-level context handle routines for context handles with the strict flag set.
parent 80700144
...@@ -6279,9 +6279,18 @@ void WINAPI NdrContextHandleSize(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6279,9 +6279,18 @@ void WINAPI NdrContextHandleSize(PMIDL_STUB_MESSAGE pStubMsg,
NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING pFormat) PFORMAT_STRING pFormat)
{ {
RPC_SYNTAX_IDENTIFIER *if_id = NULL;
TRACE("(%p, %p)\n", pStubMsg, pFormat); TRACE("(%p, %p)\n", pStubMsg, pFormat);
if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
{
RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
if_id = &sif->InterfaceId;
}
return NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, NULL, return NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, NULL,
pStubMsg->RpcMsg->DataRepresentation, NULL, 0); pStubMsg->RpcMsg->DataRepresentation, if_id, 0);
} }
void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg, void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...@@ -6289,6 +6298,8 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6289,6 +6298,8 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
NDR_RUNDOWN RundownRoutine, NDR_RUNDOWN RundownRoutine,
PFORMAT_STRING pFormat) PFORMAT_STRING pFormat)
{ {
RPC_SYNTAX_IDENTIFIER *if_id = NULL;
TRACE("(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat); TRACE("(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat);
ALIGN_POINTER(pStubMsg->Buffer, 4); ALIGN_POINTER(pStubMsg->Buffer, 4);
...@@ -6300,9 +6311,14 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6300,9 +6311,14 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
/* FIXME: do something with pFormat */ if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
{
RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
if_id = &sif->InterfaceId;
}
NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle, NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle,
pStubMsg->Buffer, RundownRoutine, NULL, 0); pStubMsg->Buffer, RundownRoutine, if_id, 0);
pStubMsg->Buffer += cbNDRContext; pStubMsg->Buffer += cbNDRContext;
} }
...@@ -6310,6 +6326,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6310,6 +6326,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING pFormat) PFORMAT_STRING pFormat)
{ {
NDR_SCONTEXT ContextHandle; NDR_SCONTEXT ContextHandle;
RPC_SYNTAX_IDENTIFIER *if_id = NULL;
TRACE("(%p, %p)\n", pStubMsg, pFormat); TRACE("(%p, %p)\n", pStubMsg, pFormat);
...@@ -6322,11 +6339,16 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6322,11 +6339,16 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
/* FIXME: do something with pFormat */ if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
{
RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
if_id = &sif->InterfaceId;
}
ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle,
pStubMsg->Buffer, pStubMsg->Buffer,
pStubMsg->RpcMsg->DataRepresentation, pStubMsg->RpcMsg->DataRepresentation,
NULL, 0); if_id, 0);
pStubMsg->Buffer += cbNDRContext; pStubMsg->Buffer += cbNDRContext;
return ContextHandle; return ContextHandle;
......
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