I have a program with 2 threads. I want the first thread to be run under user permissions of USER_1, and the second under USER_2 of Windows. When I log in as USER_1, both threads have USER_1 permissions. How can I change the user of the thread!?
Share
You need to assign an impersonation token to a thread using SetThreadToken(). It may not be very trivial to do, though.