Link to home
Start Free TrialLog in
Avatar of rtsh
rtsh

asked on

WTSQuerySessionInformation and WTSConnectState

I've written some code in C# to loop through the results of WTSEnumerateSessions and record the names of all users, together with the connection state.  The aim is to log the amount of time individual users spend actually using a particular shared Windows XP machine.

Whilst I do see a change in state between WTSDisconnected and WTSActive as I switch users, I'd expect to see WTSDisconnected for *all* users if the machine is at the Windows XP friendly logon screen.

So, the question is:  How can I tell if the computer is at the Windows XP logon screen, or how can I tell if a session that's WTSActive isn't actually active?
ASKER CERTIFIED SOLUTION
Avatar of Mikeh926
Mikeh926

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rtsh
rtsh

ASKER