Get UserToken from Logon ID (LUID) (C++)

Posted by strDisplayName on Stack Overflow See other posts from Stack Overflow or by strDisplayName
Published on 2010-12-26T13:48:18Z Indexed on 2010/12/26 13:54 UTC
Read the original article Hit count: 257

Hey Everybody

I'm trying to understand better how windows sessions work, so if I have some weird mistakes in the question, please, let me know :-) .

I use LsaEnumerateLogonSessions() to get all the logged on sessions in the system. Now I have LUID that represents a log-on, and if I understand correctly, it represents a user that logged on or a build it user like SYSTEM.

Now, if user X starts a process, windows gives that process a token that represents X. So here comes my question:

Is there a way (in a windows service) to get the user's token from LUID? I know I can get it from a process HANDLE, but that is not what I want...

Thanks a lot!

© Stack Overflow or respective owner

Related posts about Windows

Related posts about session