Implement RpcSmDestroyClientContext and RpcSsDestroyClientContext
authorSaveliy Tretiakov <saveliyt@gmail.com>
Wed, 5 Apr 2006 07:00:28 +0000 (07:00 +0000)
committerSaveliy Tretiakov <saveliyt@gmail.com>
Wed, 5 Apr 2006 07:00:28 +0000 (07:00 +0000)
svn path=/trunk/; revision=21458

reactos/dll/win32/rpcrt4/ndr_marshall.c
reactos/dll/win32/rpcrt4/rpcrt4.spec

index 3a522bf..eb6f676 100644 (file)
@@ -3351,6 +3351,9 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
     return NULL;
 }
 
+/***********************************************************************
+ *           NDRCContextBinding
+ */
 RPC_BINDING_HANDLE WINAPI NDRCContextBinding(NDR_CCONTEXT CContext)
 {
     if(!CContext)
@@ -3358,3 +3361,35 @@ RPC_BINDING_HANDLE WINAPI NDRCContextBinding(NDR_CCONTEXT CContext)
 
     return (RPC_BINDING_HANDLE)((CContextHandle*)CContext)->Binding;
 }
+
+/***********************************************************************
+ *           RpcSmDestroyClientContext
+ */
+RPC_STATUS WINAPI RpcSmDestroyClientContext(void** ContextHandle)
+{
+       CContextHandle *ctx = (CContextHandle*)ContextHandle;
+
+       if(!ctx)
+               return RPC_X_SS_CONTEXT_MISMATCH;
+
+       RPCRT4_DestroyBinding(ctx->Binding);
+       HeapFree(GetProcessHeap(), 0, ctx);
+       *ContextHandle = NULL;
+
+       return RPC_S_OK;
+}
+
+/***********************************************************************
+ *           RpcSsDestroyClientContext
+ */
+void WINAPI RpcSsDestroyClientContext(void** ContextHandle)
+{
+       RPC_STATUS status;
+
+       status = RpcSmDestroyClientContext(ContextHandle);
+
+       if(status != RPC_S_OK) 
+               RpcRaiseException(status);
+}
+
+
index 7cbfc9f..9feecd7 100644 (file)
 @ stub RpcServerYield
 @ stub RpcSmAllocate
 @ stub RpcSmClientFree
-@ stub RpcSmDestroyClientContext
+@ stdcall RpcSmDestroyClientContext (ptr)
 @ stub RpcSmDisableAllocate
 @ stub RpcSmEnableAllocate
 @ stub RpcSmFree
 @ stub RpcSsAllocate
 @ stub RpcSsContextLockExclusive # wxp
 @ stub RpcSsContextLockShared # wxp
-@ stub RpcSsDestroyClientContext
+@ stdcall RpcSsDestroyClientContext (ptr)
 @ stub RpcSsDisableAllocate
 @ stub RpcSsDontSerializeContext
 @ stub RpcSsEnableAllocate