2.2.3 SessionStateEnum

The SessionStateEnum enumeration defines the states of a terminal services session.

 typedef  enum
 {
   pchActive = 0,
   pchConnected = 1,
   pchConnectQuery = 2,
   pchShadow = 3,
   pchDisconnected = 4,
   pchIdle = 5,
   pchListen = 6,
   pchReset = 7,
   pchDown = 8,
   pchInit = 9,
   pchStateInvalid = 10
 } SessionStateEnum;

pchActive:  The user is logged on and active.

pchConnected:  The server is connected to the client.

pchConnectQuery:  The server is in the process of connecting to the client.

pchShadow:  The session is shadowing another session.

pchDisconnected:  The client has disconnected from the session.

pchIdle:  The session is waiting for a client to connect.

pchListen:  The session is listening for a request for a new connection. No user is logged on to a listener session. A listener session cannot be reset, shadowed, or changed to a regular client session.

pchReset:  The session is being reset.

pchDown:  The session is down due to an error.

pchInit:  The session is initializing.

pchStateInvalid:  The session is in an unknown state.