<div class="content" name="RpcWinStationGetTermSrvCountersValue" uuid="46f107c4-f090-4802-b6d8-c510cfcb9a93"><p>The RpcWinStationGetTermSrvCountersValue method retrieves
the current value of requested <span><a href="c41d3367-04c9-4c93-babf-9b5de834eb29#gt_b416f72e-cf04-4d80-bf93-f5753f3b0998" data-linktype="relative-path">terminal server</a></span>
performance counters. The caller is not required to have any specific
permission to call this method.</p><dl>
<dd>
<div><pre> BOOLEAN RpcWinStationGetTermSrvCountersValue(
   [in] SERVER_HANDLE hServer,
   [out] DWORD* pResult,
   [in, range(0, 0x1000)] DWORD dwEntries,
   [in, out, size_is(dwEntries)] PTS_COUNTER pCounter
 );
</pre></div>
</dd></dl><p><b>hServer: </b>Handle to the server object. This is
of type <span><a href="49484cdf-2feb-4de9-a588-5d01cf8995dc" data-linktype="relative-path">SERVER_HANDLE</a></span>. The <i>hServer</i>
argument MUST be obtained from a previous call to <span><a href="fd6f339d-f5dd-452c-a9a9-ec753c22a36a" data-linktype="relative-path">RpcWinStationOpenServer</a></span>.
</p><p><b>pResult: </b> If the call was successful, this
parameter MUST be STATUS_SUCCESS (0x00000000); otherwise it MUST be an
implementation-specific negative value. </p><p><b>dwEntries: </b> The number of performance counters
to query. Indicates the size of the array pointed to by pCounter. </p><p><b>pCounter: </b> An array of <span><a href="a0173488-c483-4340-ab1a-aab2d21ea323" data-linktype="relative-path">TS_COUNTER</a></span>
structures. The caller MUST set the <b>dwCounterId</b> in the TS_COUNTER
structures for each entry in the array to indicate the counter whose current
value to retrieve. On return, the method MUST set the value for that
performance counter. If the performance counter ID is not recognized or is not
supported, it will set the <b>bResult</b> to 0.</p><p><b>Return Values: </b> Returns TRUE if the call
succeeded, and FALSE if the method failed. On failure, pResult indicates the
failure status code. Individual entries in the array pCounter will indicate
whether or not the counter data for that counter could be retrieved. </p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x01 TRUE</td>
  <td>Successful completion.</td>
 </tr><tr>
  <td>0x00 FALSE</td>
  <td>Method call failed.</td>
 </tr></tbody></table>
</dd></dl><p> </p></div>