RpcBindingServerFromClient

The RpcBindingServerFromClient function converts a client binding handle to a server binding handle.

This function is supported by both 32-bit platforms — Windows NT and Windows 95.

#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcBindingServerFromClient( 
  RPC_BINDING_HANDLE  ClientBinding,   
  RPC_BINDING_HANDLE *  ServerBinding  
);
 

Parameters

ClientBinding
Specifies the client binding handle to convert to a server binding handle.
ServerBinding
Returns a server binding handle.

Remarks

An application calls the RpcBindingServerFromClient routine to convert a client binding handle into a partially-bound server binding handle.

The RpcBindingServerFromClient routine is supported for the following protocol sequences:

An application gets a client binding handle from the RPC runtime. When the RPC arrives at a server, the runtime creates a client binding handle that contains information about the calling client. This handle is passed by the runtime to the server manager routine as the first argument.

The following information pertains to the server binding handle that is returned by RpcBindingServerFromClient:

Return Values

Value Meaning
RPC_S_OK Success
RPC_S_INVALID_BINDING Invalid binding handle
RPC_S_WRONG_KIND_OF_BINDING Wrong kind of binding for operation
RPC_S_CANNOT_SUPPORT Cannot determine the client's host (not TCP or SPX)

QuickInfo

  Windows NT: Yes
  Windows CE: Unsupported.
  Header: Declared in rpcdce.h.
  Import Library: Link with rpcrt4.lib.

See Also

RpcBindingFree, RpcBindingSetObject, RpcEpRegister, RpcEpRegisterNoReplace, RpcNsBindingImportBegin, RpcNsBindingLookupBegin, RpcBindingFromStringBinding