3.5.4.1.1 RpcGetClientData (Opnum 0)

The RpcGetClientData method returns information about the client that is connected to a particular session running on a terminal server. The caller must have WINSTATION_QUERY permission. 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 RpcGetClientData(
   [in] handle_t hBinding,
   [in] ULONG SessionId,
   [out, size_is(,*pOutBuffByteLen)] 
     unsigned char** ppBuff,
   [out] ULONG* pOutBuffByteLen
 );

hBinding:  The RPC binding handle. For more information, see [MSDN-RPCBIND].

SessionId:  The ID of the session from which client data is to be retrieved.

ppBuff:  The buffer that contains the client data. This data is of type PWINSTATIONCLIENT, specified in section 2.2.2.19. The buffer is allocated by RpcGetClientData.

pOutBuffByteLen:  The number of bytes of client data that is returned.

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.