Rob Shearman : rpcrt4: Implement RpcSmDestroyClientContext and RpcSsDestroyClientContext.

Alexandre Julliard julliard at winehq.org
Wed Sep 19 08:16:14 CDT 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Tue Sep 18 16:32:29 2007 +0100

rpcrt4: Implement RpcSmDestroyClientContext and RpcSsDestroyClientContext.

---

 dlls/rpcrt4/ndr_marshall.c |   40 ++++++++++++++++++++++++++++++++++++++++
 dlls/rpcrt4/rpcrt4.spec    |    4 ++--
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index de84410..e238dae 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -5821,6 +5821,46 @@ void WINAPI NDRCContextMarshall(NDR_CCONTEXT CContext, void *pBuff)
     }
 }
 
+/***********************************************************************
+ *           RpcSmDestroyClientContext [RPCRT4.@]
+ */
+RPC_STATUS WINAPI RpcSmDestroyClientContext(void **ContextHandle)
+{
+    RPC_STATUS status = RPC_X_SS_CONTEXT_MISMATCH;
+    struct context_handle_entry *che = NULL;
+
+    TRACE("(%p)\n", ContextHandle);
+
+    EnterCriticalSection(&ndr_context_cs);
+    che = get_context_entry(*ContextHandle);
+    *ContextHandle = NULL;
+    if (che)
+    {
+        status = RPC_S_OK;
+        list_remove(&che->entry);
+    }
+
+    LeaveCriticalSection(&ndr_context_cs);
+
+    if (che)
+    {
+        RpcBindingFree(&che->handle);
+        HeapFree(GetProcessHeap(), 0, che);
+    }
+
+    return status;
+}
+
+/***********************************************************************
+ *           RpcSsDestroyClientContext [RPCRT4.@]
+ */
+void WINAPI RpcSsDestroyClientContext(void **ContextHandle)
+{
+    RPC_STATUS status = RpcSmDestroyClientContext(ContextHandle);
+    if (status != RPC_S_OK)
+        RpcRaiseException(status);
+}
+
 static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
                                       RPC_BINDING_HANDLE hBinding,
                                       const ndr_context_handle *chi)
diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec
index c5498d7..581075b 100644
--- a/dlls/rpcrt4/rpcrt4.spec
+++ b/dlls/rpcrt4/rpcrt4.spec
@@ -494,7 +494,7 @@
 @ stub RpcServerYield
 @ stub RpcSmAllocate
 @ stub RpcSmClientFree
-@ stub RpcSmDestroyClientContext
+@ stdcall RpcSmDestroyClientContext(ptr)
 @ stub RpcSmDisableAllocate
 @ stub RpcSmEnableAllocate
 @ stub RpcSmFree
@@ -505,7 +505,7 @@
 @ stub RpcSsAllocate
 @ stub RpcSsContextLockExclusive # wxp
 @ stub RpcSsContextLockShared # wxp
-@ stub RpcSsDestroyClientContext
+@ stdcall RpcSsDestroyClientContext(ptr)
 @ stub RpcSsDisableAllocate
 @ stub RpcSsDontSerializeContext
 @ stub RpcSsEnableAllocate




More information about the wine-cvs mailing list