RpcBindingServerFromClient function (rpcdce.h)
An application calls RpcBindingServerFromClient to convert a client binding handle into a partially-bound server binding handle.
Syntax
RPC_STATUS 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
Value | Meaning |
---|---|
|
The call succeeded. |
|
The binding handle was invalid. |
|
This was the wrong kind of binding for the operation. |
|
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:
- ncadg_ip_udp
- ncadg_ipx
- ncacn_ip_tcp
- ncacn_spx.
- ncacn_np (effective with Windows 2000)
- ncacn_http
- ncalrpc
Calling RpcBindingServerFromClient converts this client handle to a server handle that has these properties:
- The server handle is a partially-bound handle. It contains a network address for the calling client, but lacks an endpoint.
- The server 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 server handle contains no authentication information.
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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | rpcdce.h (include Rpc.h) |
Library | Rpcrt4.lib |
DLL | Rpcrt4.dll |