WTS_INFO_CLASS enumeration
Applies to: desktop apps only
Contains values that indicate the type of session information to retrieve in a call to the WTSQuerySessionInformation function.
Syntax
typedef enum _WTS_INFO_CLASS {
WTSInitialProgram = 0,
WTSApplicationName = 1,
WTSWorkingDirectory = 2,
WTSOEMId = 3,
WTSSessionId = 4,
WTSUserName = 5,
WTSWinStationName = 6,
WTSDomainName = 7,
WTSConnectState = 8,
WTSClientBuildNumber = 9,
WTSClientName = 10,
WTSClientDirectory = 11,
WTSClientProductId = 12,
WTSClientHardwareId = 13,
WTSClientAddress = 14,
WTSClientDisplay = 15,
WTSClientProtocolType = 16,
WTSIdleTime = 17,
WTSLogonTime = 18,
WTSIncomingBytes = 19,
WTSOutgoingBytes = 20,
WTSIncomingFrames = 21,
WTSOutgoingFrames = 22,
WTSClientInfo = 23,
WTSSessionInfo = 24,
WTSSessionInfoEx = 25,
WTSConfigInfo = 26,
WTSValidationInfo = 27,
WTSSessionAddressV4 = 28,
WTSIsRemoteSession = 29
} WTS_INFO_CLASS;
Constants
- WTSInitialProgram
-
A null-terminated string that contains the name of the initial program that Remote Desktop Services runs when the user logs on.
- WTSApplicationName
-
A null-terminated string that contains the published name of the application that the session is running.
- WTSWorkingDirectory
-
A null-terminated string that contains the default directory used when launching the initial program.
- WTSOEMId
-
This value is not used.
- WTSSessionId
-
A ULONG value that contains the session identifier.
- WTSUserName
-
A null-terminated string that contains the name of the user associated with the session.
- WTSWinStationName
-
A null-terminated string that contains the name of the Remote Desktop Services session.
Note Despite its name, specifying this type does not return the window station name. Rather, it returns the name of the Remote Desktop Services session. Each Remote Desktop Services session is associated with an interactive window station. Because the only supported window station name for an interactive window station is "WinSta0", each session is associated with its own "WinSta0" window station. For more information, see Window Stations.
- WTSDomainName
-
A null-terminated string that contains the name of the domain to which the logged-on user belongs.
- WTSConnectState
-
The session's current connection state. For more information, see WTS_CONNECTSTATE_CLASS.
- WTSClientBuildNumber
-
A ULONG value that contains the build number of the client.
- WTSClientName
-
A null-terminated string that contains the name of the client.
- WTSClientDirectory
-
A null-terminated string that contains the directory in which the client is installed.
- WTSClientProductId
-
A USHORT client-specific product identifier.
- WTSClientHardwareId
-
A ULONG value that contains a client-specific hardware identifier. This option is reserved for future use. WTSQuerySessionInformation will always return a value of 0.
- WTSClientAddress
-
The network type and network address of the client. For more information, see WTS_CLIENT_ADDRESS.
The IP address is offset by two bytes from the start of the Address member of the WTS_CLIENT_ADDRESS structure.
- WTSClientDisplay
-
Information about the display resolution of the client. For more information, see WTS_CLIENT_DISPLAY.
- WTSClientProtocolType
-
A USHORT value that specifies information about the protocol type for the session. This is one of the following values.
Value Meaning 0
The console session.
1
This value is retained for legacy purposes.
2
The RDP protocol.
- WTSIdleTime
-
This value returns FALSE. If you call GetLastError to get extended error information, GetLastError returns ERROR_NOT_SUPPORTED.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not used. - WTSLogonTime
-
This value returns FALSE. If you call GetLastError to get extended error information, GetLastError returns ERROR_NOT_SUPPORTED.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not used. - WTSIncomingBytes
-
This value returns FALSE. If you call GetLastError to get extended error information, GetLastError returns ERROR_NOT_SUPPORTED.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not used. - WTSOutgoingBytes
-
This value returns FALSE. If you call GetLastError to get extended error information, GetLastError returns ERROR_NOT_SUPPORTED.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not used. - WTSIncomingFrames
-
This value returns FALSE. If you call GetLastError to get extended error information, GetLastError returns ERROR_NOT_SUPPORTED.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not used. - WTSOutgoingFrames
-
This value returns FALSE. If you call GetLastError to get extended error information, GetLastError returns ERROR_NOT_SUPPORTED.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not used. - WTSClientInfo
-
Information about a Remote Desktop Connection (RDC) client. For more information, see WTSCLIENT.
Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not supported. This value is supported beginning with Windows Server 2008 and Windows Vista with SP1. - WTSSessionInfo
-
Information about a client session on an RD Session Host server. For more information, see WTSINFO.
Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not supported. This value is supported beginning with Windows Server 2008 and Windows Vista with SP1. - WTSSessionInfoEx
-
Extended information about a session on an RD Session Host server. For more information, see WTSINFOEX.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not supported. - WTSConfigInfo
-
Information about the configuration of an RD Session Host server.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not supported. - WTSValidationInfo
-
This value is not supported.
- WTSSessionAddressV4
-
A WTS_SESSION_ADDRESS structure that contains the IPv4 address assigned to the session. If the session does not have a virtual IP address, the WTSQuerySessionInformation function returns ERROR_NOT_SUPPORTED.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not supported. - WTSIsRemoteSession
-
Determines whether the current session is a remote session. The WTSQuerySessionInformation function returns a value of TRUE to indicate that the current session is a remote session, and FALSE to indicate that the current session is a local session. This value can only be used for the local machine, so the hServer parameter of the WTSQuerySessionInformation function must contain WTS_CURRENT_SERVER_HANDLE.
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This value is not supported.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012
- 10/12/2011
- Jeff Muir