A similar question got asked by others here at least twice already (see links below) but never properly answered, perhaps because it wasn't put the right way. Let me have a go:
I have a process running under the local account on Windows and I need locale information about the user who is logged into the interactive session if there is one or any interactive session if there is more than one.
I need to know the user's language and country settings and it has to work on all kinds of Windows starting XP Service Pack 3.
I very much appreciate your answers!
The previous related questions that didn't really get answered:
I would do it in the following way:
LsaEnumerateLogonSessions
LsaGetLogonSessionData
to get logged on user SID identifier. ConvertSidToStringSid
function to get a string representation of a sid. This key has all sorts of information needed, and looks like all listed WINAPI finctions are available starting at Windows XP.
So this should work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.