我的微店
得闲笔记
我命由我不由天

Contains values that indicate the type of session information to retrieve in a call to theWTSQuerySessionInformation 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, 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

Wtsapi32.h
 
 
 

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.

 

WTS_CONNECTSTATE_CLASS enumeration  

1 out of 4 rated this helpful - Rate this topic

Specifies the connection state of a Remote Desktop Services session.

Syntax

typedef enum
_WTS_CONNECTSTATE_CLASS {
  WTSActive,
  WTSConnected,
  WTSConnectQuery,
  WTSShadow,
  WTSDisconnected,
  WTSIdle,
  WTSListen,
  WTSReset,
  WTSDown,
  WTSInit
} WTS_CONNECTSTATE_CLASS;
 

Constants

WTSActive

A user is logged on to the WinStation.

WTSConnected

The WinStation is connected to the client.

WTSConnectQuery

The WinStation is in the process of connecting to the client.

WTSShadow

The WinStation is shadowing another WinStation.

WTSDisconnected

The WinStation is active but the client is disconnected.

WTSIdle

The WinStation is waiting for a client to connect.

WTSListen

The WinStation is listening for a connection. A listener session waits for requests for new client connections. No user is logged on a listener session. A listener session cannot be reset, shadowed, or changed to a regular client session.

WTSReset

The WinStation is being reset.

WTSDown

The WinStation is down due to an error.

WTSInit

The WinStation is initializing.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wtsapi32.h

See also

WTS_SESSION_INFO
WTSQuerySessionInformation
WTSWaitSystemEvent

 

WTS_CLIENT_ADDRESS structure (Windows)

0 out of 1 rated this helpful - Rate this topic

Contains the client network address of a Remote Desktop Services session.

Syntax

typedef struct
_WTS_CLIENT_ADDRESS {
  DWORD AddressFamily;
  BYTE  Address[20];
} WTS_CLIENT_ADDRESS, *PWTS_CLIENT_ADDRESS;
 

Members

AddressFamily

Address family. This member can be AF_INET, AF_INET6, AF_IPX, AF_NETBIOS, or AF_UNSPEC.

Windows Server 2003 and Windows XP:  This member can be AF_INET, AF_IPX, AF_NETBIOS, or AF_UNSPEC.
Address

Client network address.

Remarks

The client network address is reported by the RDP client itself when it connects to the server. This could be different than the address that actually connected to the server. For example, suppose there is a NAT between the client and the server. The client can report its own IP address, but the IP address that actually connects to the server is the NAT address. For VPN connections, the IP address might not be discoverable by the client. If it cannot be discovered, the client can report the only IP address it has, which may be the ISP assigned address. Because the address may not be the actual network address, it should not be used as a form of client authentication.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wtsapi32.h

See also

WTSQuerySessionInformation
 

WTS_CLIENT_DISPLAY structure (Windows)

0 out of 1 rated this helpful - Rate this topic

Contains information about the display of a Remote Desktop Connection (RDC) client.

Syntax

typedef struct
_WTS_CLIENT_DISPLAY {
  DWORD HorizontalResolution;
  DWORD VerticalResolution;
  DWORD ColorDepth;
} WTS_CLIENT_DISPLAY, *PWTS_CLIENT_DISPLAY;
 

Members

HorizontalResolution

Horizontal dimension, in pixels, of the client's display.

VerticalResolution

Vertical dimension, in pixels, of the client's display.

ColorDepth

Color depth of the client's display. This member can be one of the following values.

Value Meaning
1

4 bits per pixel.

2

8 bits per pixel.

4

16 bits per pixel.

8

A 3-byte RGB values for a maximum of 2^24 colors.

16

15 bits per pixel.

24

24 bits per pixel.

32

32 bits per pixel.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wtsapi32.h

See also

WTSQuerySessionInformation 


来自为知笔记(Wiz)


作者:不得闲
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原
文连接,否则保留追究法律责任的权利。
posted on 2012-12-31 09:57  不得闲  阅读(1724)  评论(0编辑  收藏  举报