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
| 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. |
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
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 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.
The server application must call RpcBindingFree to free the resources used by the server binding handle once it is no longer needed.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- RpcBindingFree
- RpcBindingSetObject
- RpcEpRegister
- RpcEpRegisterNoReplace
- RpcNsBindingImportBegin
- RpcNsBindingLookupBegin
- RpcBindingFromStringBinding