I_RpcBindingInqLocalClientPID function (rpcdcep.h)

[The I_RpcBindingInqLocalClientPID function is available for use in the operating systems specified in the Requirements section. Instead, call RpcServerInqCallAttributes.]

The I_RpcBindingInqLocalClientPID function obtains a client process ID.

Syntax

RPC_STATUS I_RpcBindingInqLocalClientPID(
  [in, optional] RPC_BINDING_HANDLE Binding,
  [out]          unsigned long      *Pid
);

Parameters

[in, optional] Binding

RPC_BINDING_HANDLE that specifies the binding handle for an explicit RPC binding from the client to a server application.

[out] Pid

Contains the process ID of the client that issued the call upon return.

Return value

Value Meaning
RPC_S_OK
The function call was successful.
RPC_S_NO_CALL_ACTIVE
The current thread does not have an active RPC call.
RPC_S_INVALID_BINDING
The RPC binding handle is invalid.
 
Note  For a list of valid error codes, see RPC Return Values.
 

Remarks

The client process ID is only returned in ClientBinding when the "ncalrpc" protocol sequence is used. Until the process terminates, the process ID value uniquely identifies it on the client. When the process terminates, the process ID can be used by new processes.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header rpcdcep.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll