RpcBindingServerFromClient  I479.2

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:

    ncadg_ip_udpUFYB4

    ncadg_ipxOEL7WD

    ncacn_ip_tcpCKYP54

    ncacn_spxNLLAWD.

 

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:

    The returned handle is a partially bound handle. It contains a network address for the calling client, but lacks an endpoint.

    The returned handle contains the same object UUID used by the calling client. This can be the nil UUID. For more information on how a client specifies an object UUID for a call, see RpcBindingsetObject, RpcNsBindingImportBegin, RpcNsBindingLookupBegin, and RpcBindingFromStringBinding.

    The returned handle contains no authentication information.

 

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)

 

See Also

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