3.5.4.1.5 RpcGetRemoteAddress (Opnum 4)
The RpcGetRemoteAddress method retrieves the IP address of the client computer connected to the session on the terminal server. The caller MUST have WINSTATION_QUERY permission for the session. The method checks whether the caller has WINSTATION_QUERY permission (section 3.1.1) by setting it as the Access Request mask, and fails if the caller does not have the permission.
-
HRESULT RpcGetRemoteAddress( [in] handle_t hBinding, [in] ULONG SessionId, [out] PRCM_REMOTEADDRESS pRemoteAddress );
hBinding: The RPC binding handle. For more information, see [MSDN-RPCBIND].
SessionId: The ID of the session for which client data is to be retrieved.
pRemoteAddress: The address of the client computer that is connected to the session. This is of the type PRCM_REMOTEADDRESS.
Return Values: The method MUST return S_OK (0x00000000) on success; otherwise, it MUST return an implementation-specific negative value.
-
Return value/code
Description
0x00000000
S_OK
Successful completion.