Where do I get the ULONG LoginID values to pass to WTSConnectSession? I need both a ULONG LogonId and a ULONG TargetLogonId.
Is this the same as the SessionID I'll get back from WTSQuerySessionInformation when I pass in WTSSessionId? I suspect not (I tried it and WTSConnectSession did not work.)
The MSDN glossay says a logon identifier is a LUID which I can get via GetTokenInformation but that is a structure, not a ULONG. Is there an API to get a ULONG loginId from an LUID?