Rob Shearman : rpcrt4: Pass the interface identifier to the lower-level context handle routines for context handles with the strict flag set .

Alexandre Julliard julliard at winehq.org
Mon Jan 7 08:39:23 CST 2008


Module: wine
Branch: master
Commit: f9fc52f602ec9af5610ba14c6b2c5bbcc9ae6958
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f9fc52f602ec9af5610ba14c6b2c5bbcc9ae6958

Author: Rob Shearman <rob at codeweavers.com>
Date:   Sun Jan  6 21:21:21 2008 +0000

rpcrt4: Pass the interface identifier to the lower-level context handle routines for context handles with the strict flag set.

---

 dlls/rpcrt4/ndr_marshall.c |   32 +++++++++++++++++++++++++++-----
 1 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index b3c7df8..dcbb4fd 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -6279,9 +6279,18 @@ void WINAPI NdrContextHandleSize(PMIDL_STUB_MESSAGE pStubMsg,
 NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg,
                                                PFORMAT_STRING pFormat)
 {
+    RPC_SYNTAX_IDENTIFIER *if_id = NULL;
+
     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,
-                                  pStubMsg->RpcMsg->DataRepresentation, NULL, 0);
+                                  pStubMsg->RpcMsg->DataRepresentation, if_id, 0);
 }
 
 void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
@@ -6289,6 +6298,8 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
                                         NDR_RUNDOWN RundownRoutine,
                                         PFORMAT_STRING pFormat)
 {
+    RPC_SYNTAX_IDENTIFIER *if_id = NULL;
+
     TRACE("(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat);
 
     ALIGN_POINTER(pStubMsg->Buffer, 4);
@@ -6300,9 +6311,14 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
         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,
-                          pStubMsg->Buffer, RundownRoutine, NULL, 0);
+                          pStubMsg->Buffer, RundownRoutine, if_id, 0);
     pStubMsg->Buffer += cbNDRContext;
 }
 
@@ -6310,6 +6326,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
                                                   PFORMAT_STRING pFormat)
 {
     NDR_SCONTEXT ContextHandle;
+    RPC_SYNTAX_IDENTIFIER *if_id = NULL;
 
     TRACE("(%p, %p)\n", pStubMsg, pFormat);
 
@@ -6322,11 +6339,16 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
         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,
                                            pStubMsg->Buffer,
                                            pStubMsg->RpcMsg->DataRepresentation,
-                                           NULL, 0);
+                                           if_id, 0);
     pStubMsg->Buffer += cbNDRContext;
 
     return ContextHandle;




More information about the wine-cvs mailing list