Reputation: 691
In c# we can get Current user process id by using this method in Windows Process.GetCurrentProcess().SessionId;
how can we do this in c++.
Upvotes: 0
Views: 3501
Reputation: 182819
Call GetCurrentProcessID to get the current process ID, and then call ProcessIDToSessionID to convert that process ID to a session ID.
Upvotes: 3