WTS_SESSION_INFOA structure (wtsapi32.h)

Contains information about a client session on a Remote Desktop Session Host (RD Session Host) server.

Syntax

typedef struct _WTS_SESSION_INFOA {
  DWORD                  SessionId;
  LPSTR                  pWinStationName;
  WTS_CONNECTSTATE_CLASS State;
} WTS_SESSION_INFOA, *PWTS_SESSION_INFOA;

Members

SessionId

Session identifier of the session.

pWinStationName

Pointer to a null-terminated string that contains the WinStation name of this session. The WinStation name is a name that Windows associates with the session, for example, "services", "console", or "RDP-Tcp#0".

State

A value from the WTS_CONNECTSTATE_CLASS enumeration type that indicates the session's current connection state.

Remarks

Note

The wtsapi32.h header defines WTS_SESSION_INFO as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Header wtsapi32.h

See also

WTSEnumerateSessions

WTS_CONNECTSTATE_CLASS