Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - WTSQuerySessionInformation

Reply
 
Old 10-21-2009   #1 (permalink)
amdrit


 
 

WTSQuerySessionInformation

I am encountering unexpected results when executing
WTSQuerySessionInformation in C# against my W2K3 terminal server.

When I query for WTSClientProtocolType, the value returned is 0 while I
expect 2.

WTSClientProtocolType
A USHORT value specifying 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.

When I query for WTSWinStationName, the value returned is "Console" while I
expect "RDP-TCP#xxx"

WTSWinStationName
A null-terminated string containing 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. Currently, since 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.


When I looked at terminal services manager, I see my session is not a
console session, rather just labled "RDP-TCP#xxx (username)"

Using C# 2008 / W2K3

Thanks in advance




My System SpecsSystem Spec
Reply

Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46