Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 244 of file ndr_contexthandle.c.
Referenced by NDRSContextMarshall(), NDRSContextMarshallEx(), NdrServerContextMarshall(), and NdrServerContextNewMarshall().
{ RpcBinding *binding = hBinding; RPC_STATUS status; ndr_context_handle *ndr = pBuff; TRACE("(%p %p %p %p %p %u)\n", hBinding, SContext, pBuff, userRunDownIn, CtxGuard, Flags); if (!binding->server || !binding->Assoc) RpcRaiseException(ERROR_INVALID_HANDLE); if (Flags & RPC_CONTEXT_HANDLE_FLAGS) FIXME("unimplemented flags: 0x%x\n", Flags & RPC_CONTEXT_HANDLE_FLAGS); if (SContext->userContext) { status = RpcServerAssoc_UpdateContextHandle(binding->Assoc, SContext, CtxGuard, userRunDownIn); if (status != RPC_S_OK) RpcRaiseException(status); ndr->attributes = 0; RpcContextHandle_GetUuid(SContext, &ndr->uuid); RPCRT4_RemoveThreadContextHandle(SContext); RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, TRUE); } else { if (!RpcContextHandle_IsGuardCorrect(SContext, CtxGuard)) RpcRaiseException(ERROR_INVALID_HANDLE); memset(ndr, 0, sizeof(*ndr)); RPCRT4_RemoveThreadContextHandle(SContext); /* Note: release the context handle twice in this case to release * one ref being kept around for the data and one ref for the * unmarshall/marshall sequence */ if (!RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, TRUE)) return; /* this is to cope with the case of the data not being valid * before and so not having a further reference */ RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, FALSE); } }