2.2.2.11 LSM_SESSIONINFO_EX_LEVEL1

The LSM_SESSIONINFO_EX_LEVEL1 is a structure containing information about a session running on a terminal server.

 typedef struct _LSM_SESSIONINFO_EX_LEVEL1 {
   LONG SessionState;
   LONG SessionFlags;
   WCHAR SessionName[33];
   WCHAR DomainName[18];
   WCHAR UserName[21];
   hyper ConnectTime;
   hyper DisconnectTime;
   hyper LogonTime;
   hyper LastInputTime;
   ULONG ProtocolDataSize;
   [size_is(ProtocolDataSize)] PBYTE ProtocolData;
 } LSM_SESSIONINFO_EX_LEVEL1,
  *PLSM_SESSIONINFO_EX_LEVEL1;

SessionState: The state of the session, as described in section 3.3.4.1.8.

SessionFlags: The state of the session. The SessionFlags member MUST be one of the values shown in the following table.

Value

Meaning

WTS_SESSIONSTATE_UNKNOWN

0xFFFFFFFF

Unknown session state

WTS_SESSIONSTATE_LOCK

0x00000000

Session is locked

WTS_SESSIONSTATE_UNLOCK

0x00000001

Session is unlocked

SessionName: The name of the terminal associated with the specific session.

DomainName: The domain to which the currently logged-on user belongs.

UserName: The name of the user logged on to the session.

ConnectTime: The time of the most recent connection to the session.

Time is measured as the number of 100-nanosecond intervals since January 1, 1601 (UTC).

DisconnectTime: The time of the most recent disconnection from the session.

Time is measured as the number of 100-nanosecond intervals since January 1, 1601 (UTC).

LogonTime: The time of the most recent logon to the session.

Time is measured as the number of 100-nanosecond intervals since January 1, 1601 (UTC).

LastInputTime: The time the session last received input. This is an indicator of how long a session has been idle.

Time is measured as the number of 100-nanosecond intervals since January 1, 1601 (UTC).

ProtocolDataSize: Size of data, in bytes, contained in ProtocolData.

ProtocolData: Data about the protocol status between the terminal server client and server. This data is of type PROTOCOLSTATUSEX.