title: Where do I get the ULONG LoginID values to pass to WTSConnectSession?
body: <p>Where do I get the ULONG LoginID values to pass to <a href="http://msdn.microsoft.com/en-us/library/bb394782(VS.85).aspx" rel="nofollow noreferrer">WTSConnectSession</a>? I need both a ULONG LogonId and a ULONG TargetLogonId.</p>
  
  <p>Is this the same as the SessionID I'll get back from <a href="http://msdn.microsoft.com/en-us/library/aa383838(VS.85).aspx" rel="nofollow noreferrer">WTSQuerySessionInformation</a> when I pass in WTSSessionId? I suspect not (I tried it and WTSConnectSession did not work.)</p>
  
  <p>The MSDN glossay says a logon identifier is a LUID which I can get via <a href="http://msdn.microsoft.com/en-us/library/aa446671(VS.85).aspx" rel="nofollow noreferrer">GetTokenInformation</a> but that is a structure, not a ULONG. Is there an API to get a ULONG loginId from an LUID? </p>