title: How to determine whether an LSA session is active in Windows XP
body: <p>I'm trying to get the list of users currently logged into a machine.</p>
  
  <p>On Windows 7, I can call LsaEnumerateLogonSessions, then WTSQuerySessionInformation with WTSConnectState.</p>
  
  <p>But on XP, each LSA session has 0 for the TS Session field (unless it's a Remote Desktop session), which always has WTSConnectState of WTSActive, and I end up listing all of the people who have logged out of the machine already. WTSQuerySessionInformation fails when the session is a Remote Desktop session.</p>