Author: tretiakov
Date: Wed Apr 12 23:17:30 2006
New Revision: 21567
URL:
http://svn.reactos.ru/svn/reactos?rev=21567&view=rev
Log:
Move all context handle stuff to ndr_contexth.c
Modified:
trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c
trunk/reactos/dll/win32/rpcrt4/rpc_binding.h
trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_marsha…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c (original)
+++ trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c Wed Apr 12 23:17:30 2006
@@ -3229,167 +3229,3 @@
/* nothing to do */
}
-
-/***********************************************************************
- * NDRCContextMarshall
- */
-void WINAPI NDRCContextMarshall(NDR_CCONTEXT CContext, void *pBuff )
-{
- CContextHandle *ctx = (CContextHandle*)CContext;
- memcpy(pBuff, &ctx->Ndr, sizeof(ContextHandleNdr));
-}
-
-/***********************************************************************
- * NdrClientContextMarshall
- */
-void WINAPI NdrClientContextMarshall(PMIDL_STUB_MESSAGE pStubMsg,
- NDR_CCONTEXT ContextHandle,
- int fCheck)
-{
-
- if(!ContextHandle)
- RpcRaiseException(ERROR_INVALID_HANDLE);
-
- NDRCContextMarshall(ContextHandle, pStubMsg->Buffer);
-
- pStubMsg->Buffer += sizeof(ContextHandleNdr);
-
-}
-
-
-/***********************************************************************
- * NDRCContextUnmarshall
- */
-void WINAPI NDRCContextUnmarshall(NDR_CCONTEXT *pCContext,
- RPC_BINDING_HANDLE hBinding,
- void *pBuff,
- unsigned long DataRepresentation )
-{
- CContextHandle *ctx = (CContextHandle*)*pCContext;
- ContextHandleNdr *ndr = (ContextHandleNdr*)pBuff;
- RPC_STATUS status;
-
- if(UuidIsNil(&ndr->uuid, &status))
- {
- if(ctx)
- {
- RPCRT4_DestroyBinding(ctx->Binding);
- HeapFree(GetProcessHeap(), 0, ctx);
- }
- *pCContext = NULL;
- }
- else
- {
- ctx = HeapAlloc(GetProcessHeap(), 0, sizeof(CContextHandle));
- if(!ctx) RpcRaiseException(ERROR_OUTOFMEMORY);
-
- status = RpcBindingCopy(hBinding, (RPC_BINDING_HANDLE*) &ctx->Binding);
- if(status != RPC_S_OK) RpcRaiseException(status);
-
- memcpy(&ctx->Ndr, ndr, sizeof(ContextHandleNdr));
- *pCContext = (NDR_CCONTEXT)ctx;
- }
-}
-
-/***********************************************************************
- * NdrClientContextUnmarshall
- */
-void WINAPI NdrClientContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
- NDR_CCONTEXT * pContextHandle,
- RPC_BINDING_HANDLE BindHandle)
-{
- if(!pContextHandle)
- RpcRaiseException(ERROR_INVALID_HANDLE);
-
- NDRCContextUnmarshall(pContextHandle,
- ((CContextHandle*)pContextHandle)->Binding,
- pStubMsg->Buffer,
- pStubMsg->RpcMsg->DataRepresentation);
-
- pStubMsg->Buffer += sizeof(ContextHandleNdr);
-}
-
-void WINAPI NdrServerContextMarshall(PMIDL_STUB_MESSAGE pStubMsg,
- NDR_SCONTEXT ContextHandle,
- NDR_RUNDOWN RundownRoutine )
-{
- FIXME("(%p, %p, %p): stub\n", pStubMsg, ContextHandle, RundownRoutine);
-}
-
-NDR_SCONTEXT WINAPI NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg)
-{
- FIXME("(%p): stub\n", pStubMsg);
- return NULL;
-}
-
-void WINAPI NdrContextHandleSize(PMIDL_STUB_MESSAGE pStubMsg,
- unsigned char* pMemory,
- PFORMAT_STRING pFormat)
-{
- FIXME("(%p, %p, %p): stub\n", pStubMsg, pMemory, pFormat);
-}
-
-NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg,
- PFORMAT_STRING pFormat)
-{
- FIXME("(%p, %p): stub\n", pStubMsg, pFormat);
- return NULL;
-}
-
-void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
- NDR_SCONTEXT ContextHandle,
- NDR_RUNDOWN RundownRoutine,
- PFORMAT_STRING pFormat)
-{
- FIXME("(%p, %p, %p, %p): stub\n", pStubMsg, ContextHandle, RundownRoutine,
pFormat);
-}
-
-NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
- PFORMAT_STRING pFormat)
-{
- FIXME("(%p, %p): stub\n", pStubMsg, pFormat);
- return NULL;
-}
-
-/***********************************************************************
- * NDRCContextBinding
- */
-RPC_BINDING_HANDLE WINAPI NDRCContextBinding(NDR_CCONTEXT CContext)
-{
- if(!CContext)
- RpcRaiseException(ERROR_INVALID_HANDLE);
-
- 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);
-}
-
-
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_binding.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_bindin…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/rpc_binding.h (original)
+++ trunk/reactos/dll/win32/rpcrt4/rpc_binding.h Wed Apr 12 23:17:30 2006
@@ -53,18 +53,6 @@
RpcConnection* FromConn;
} RpcBinding;
-typedef struct _ContextHandleNdr
-{
- UINT attributes;
- UUID uuid;
-} ContextHandleNdr;
-
-typedef struct _CContextHandle
-{
- RpcBinding *Binding;
- ContextHandleNdr Ndr;
-} CContextHandle;
-
LPSTR RPCRT4_strndupA(LPCSTR src, INT len);
LPWSTR RPCRT4_strndupW(LPWSTR src, INT len);
LPSTR RPCRT4_strdupWtoA(LPWSTR src);
Modified: trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbu…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild (original)
+++ trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild Wed Apr 12 23:17:30 2006
@@ -29,6 +29,7 @@
<file>rpc_epmap.c</file>
<file>rpc_message.c</file>
<file>rpc_server.c</file>
+ <file>ndr_contexth.c</file>
<file>rpcrt4_main.c</file>
<file>rpcss_np_client.c</file>
<file>rpcrt4.rc</file>