Export (0) Print
Expand All
Expand Minimize

RpcBindingServerFromClient function

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

Syntax


RPC_STATUS RPC_ENTRY RpcBindingServerFromClient(
  RPC_BINDING_HANDLE ClientBinding,
  RPC_BINDING_HANDLE *ServerBinding
);

Parameters

ClientBinding

Client binding handle to convert to a server binding handle. If a value of zero is specified, the server impersonates the client that is being served by this server thread.

Note  This parameter cannot be NULL in Windows NT 4.0.

ServerBinding

Returns a server binding handle.

Return value

ValueMeaning
RPC_S_OK

The call succeeded.

RPC_S_INVALID_BINDING

The binding handle was invalid.

RPC_S_WRONG_KIND_OF_BINDING

This was the wrong kind of binding for the operation.

RPC_S_CANNOT_SUPPORT

Cannot determine the client's host. See Remarks for a list of supported protocol sequences.

 

Note  For a list of valid error codes, see RPC Return Values.

Remarks

The following protocol sequences support RpcBindingServerFromClient:

An application gets a client binding handle from the RPC run-time. When the remote procedure call arrives at a server, the run-time creates a client binding handle that contains information about the calling client. The run-time passes this handle to the server manager function as the first argument.

Calling RpcBindingServerFromClient converts this client handle to a server handle that has these properties:

The server application must call RpcBindingFree to free the resources used by the server binding handle once it is no longer needed.

Note  To query a client's address, an application starts by calling the RpcBindingServerFromClient function to obtain a partially bound server binding handle. The server binding handle can be used to obtain a string binding by invoking RpcBindingToStringBinding. The server can then call RpcStringBindingParse to extract the client's network address from the string binding.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Rpcdce.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

See also

RpcBindingFree
RpcBindingSetObject
RpcEpRegister
RpcEpRegisterNoReplace
RpcNsBindingImportBegin
RpcNsBindingLookupBegin
RpcBindingFromStringBinding

 

 

Community Additions

ADD
Show:
© 2014 Microsoft