<div class="content" name="RpcGetSessionProtocolLastInputTime" uuid="03f9b3dc-0414-47f4-96da-5a49e6c1e635"><p>The RpcGetSessionProtocolLastInputTime method returns the
protocol status and the time the last input was received by the protocol
associated with a specific session running on a <span><a href="c41d3367-04c9-4c93-babf-9b5de834eb29#gt_b416f72e-cf04-4d80-bf93-f5753f3b0998" data-linktype="relative-path">terminal server</a></span>. The
caller MUST have WINSTATION_QUERY permission for the session. The method checks
whether the caller has WINSTATION_QUERY permission (section <span><a href="4507e852-be3d-45b6-bc47-8ca0b552c94d" data-linktype="relative-path">3.1.1</a></span>)
by setting it as the Access Request mask, and fails if the caller does not have
the permission.</p><dl>
<dd>
<div><pre> HRESULT RpcGetSessionProtocolLastInputTime(
   [in] handle_t hBinding,
   [in] ULONG SessionId,
   [in] PROTOCOLSTATUS_INFO_TYPE InfoType,
   [out, size_is(,*pcbProtoStatus )] 
     unsigned char** ppProtoStatus,
   [out] ULONG* pcbProtoStatus,
   [out] hyper* pLastInputTime
 );
</pre></div>
</dd></dl><p><b>hBinding: </b> The <span><a href="c41d3367-04c9-4c93-babf-9b5de834eb29#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> binding <span><a href="c41d3367-04c9-4c93-babf-9b5de834eb29#gt_5044babb-08e3-4bb9-bc12-fe8f542b05ee" data-linktype="relative-path">handle</a></span>.
For more information, see <span><a href="https://go.microsoft.com/fwlink/?LinkId=93771" data-linktype="external">[MSDN-RPCBIND]</a></span>.</p><p><b>SessionId: </b> The ID of the session from which
information is to be retrieved.</p><p><b>InfoType: </b> Specifies what type of information
to gather. This is of type <span><a href="dd616139-394c-4ac2-81c7-175024327604" data-linktype="relative-path">PROTOCOLSTATUS_INFO_TYPE</a></span>.</p><p><b>ppProtoStatus: </b> The buffer that contains
protocol status data. This data is of type PROTOCOLSTATUS, specified in section
<span><a href="c9066753-acbd-4678-9a72-8fb1b080bd09" data-linktype="relative-path">2.2.2.20.1</a></span>.</p><p><b>pcbProtoStatus: </b> The number of bytes of protocol
data returned.</p><p><b>pLastInputTime: </b> The time the last input was
received by the server.</p><p>Time is measured as the number of 100-nanosecond
intervals since January 1, 1601 (UTC).</p><p><b>Return Values: </b>The method MUST return S_OK
(0x00000000) on success; otherwise, it MUST return an implementation-specific
negative value.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 S_OK</td>
  <td>Successful completion</td>
 </tr></tbody></table>
</dd></dl><p> </p></div>