I've been trying to use WTSEnumerateSessions to determine how many users are currently logged on, as suggested in this post.
My main problem is not understanding how to use the contents of the WTS_SESSION_INFO
struct returned to determine how many users are logged on. In Windows XP Pro SP3, when a single user is logged on, I get two lots of session info;
Win Station Name: console, ID: 0
Win Station Name: RDP-Tcp, ID: 65536
In Windows 7 Ultimate (64 bit), again when a single user is logged on, I get two lots of session info:
Win Station Name: services, ID: 0
Win Station Name: console, ID: 1
Can anyone explain/point me in the direction of a resource that can explain how and why the session information differs between the two operating systems? And how can I determine how many users are logged on from this information?
Many thanks