Contains values that indicate the type of session information to retrieve in a call to theWTSQuerySessionInformation function.
Syntax
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, seeWTS_CLIENT_ADDRESS.
The IP address is offset by two bytes from the start of the Address member of theWTS_CLIENT_ADDRESS structure.
- WTSClientDisplay
-
Information about the display resolution of the client. For more information, seeWTS_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, and Windows XP: 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, and Windows XP: 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, and Windows XP: 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, and Windows XP: 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, and Windows XP: 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, and Windows XP: This value is not used. - WTSClientInfo
-
Information about a Remote Desktop Connection (RDC) client. For more information, seeWTSCLIENT.
Windows Vista, Windows Server 2003, and Windows XP: 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, seeWTSINFO.
Windows Vista, Windows Server 2003, and Windows XP: 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, seeWTSINFOEX.
Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This value is not supported. - WTSConfigInfo
-
Information about the configuration of an RD Session Host server.
Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: 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 returnsERROR_NOT_SUPPORTED.
Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This value is not supported. - WTSIsRemoteSession
-
Determines whether the current session is a remote session. The WTSQuerySessionInformationfunction returns a value of TRUE to indicate that the current session is a remote session, andFALSE 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, and Windows XP: This value is not supported.
Requirements
Minimum supported client | Windows XP [desktop apps only] |
---|---|
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header |
|
Window Stations
A window station contains a clipboard, an atom table, and one or more desktop objects. Each window station object is a securable object. When a window station is created, it is associated with the calling process and assigned to the current session.
The interactive window station is the only window station that can display a user interface or receive user input. It is assigned to the logon session of the interactive user, and contains the keyboard, mouse, and display device. It is always named "WinSta0". All other window stations are noninteractive, which means they cannot display a user interface or receive user input.
When a user logs on to a computer using Remote Desktop Services, a session is started for the user. Each session is associated with its own interactive window station named "WinSta0". For more information, see Remote Desktop Sessions.
文连接,否则保留追究法律责任的权利。