2.2.2.17.1 TS_COUNTER_HEADER

The TS_COUNTER_HEADER is the header of the Terminal Services performance counter structure providing general information on the counter.

 typedef struct _TS_COUNTER_HEADER {
   DWORD dwCounterID;
   boolean bResult;
 } TS_COUNTER_HEADER, *PTS_COUNTER_HEADER;

dwCounterID: The identifier of the counter. Set by the caller of RpcWinStationGetTermSrvCountersValue to indicate the counter on which to retrieve data. This will be set to zero by RpcWinStationGetTermSrvCountersValue if the dwCounterId isn't recognized.

The following values for dwCounterId are supported.

Value

Meaning

TERMSRV_TOTAL_SESSIONS

0x01

Total number of sessions: Value will indicate the total number of reconnections to the server since startup.

TERMSRV_DISC_SESSIONS

0x02

Number of disconnected sessions: Value will indicate the total number of disconnections from the server since startup.

TERMSRV_RECON_SESSIONS

0x03

Number of reconnected sessions: Value will indicate the total number of all reconnected sessions that have existed on the server since startup.

TERMSRV_CURRENT_ACTIVE_SESSIONS

0x04

Current number of active sessions: Value will indicate the current number of active sessions on the server.

TERMSRV_CURRENT_DISC_SESSIONS

0x05

Current number of disconnected sessions: Value will indicate the current number of disconnected sessions on the server.

TERMSRV_PENDING_SESSIONS

0x06

Current number of pending sessions: Value will indicate the current number of pending connections to the server.<56>

TERMSRV_SUCC_TOTAL_LOGONS

0x07

Total number of successful logons: Value will indicate the total number of successful logons on the server, both locally and remotely.<57>

TERMSRV_SUCC_LOCAL_LOGONS

0x08

Total number of successful local logons: Value will indicate the total number of successful local logons on the server.<58>

TERMSRV_SUCC_REMOTE_LOGONS

0x09

Total number of successful remote logons: Value will indicate the total number of successful remote logons on the server.<59>

TERMSRV_SUCC_SESSION0_LOGONS

0x0A

Total number of successful session 0 logons: Value will indicate the total number of successful connects on the server to session 0.<60>

TERMSRV_CURRENT_TERMINATING_SESSIONS

0x0B

Number of terminating sessions: Value will indicate the current number of terminating sessions on the server.<61>

TERMSRV_CURRENT_LOGGEDON_SESSIONS

0x0C

Number of logged on sessions: Value will indicate the current number of logged-on sessions on the server.<62>

bResult: Set to TRUE if counter information is returned. Set to FALSE if counter data isn't being returned because the counter ID being requested was unrecognized.