From: cheese monkey on

Is it possible for a thread to change to a different Terminal Services
session by using ImpersonateLoggedOnUser() ?

My process is running as a service in Session 0, I can get the primary
token for a user running in Session 1.

If I do CreateProcessAsUser() using that token, I get a new process
running in session 1.

But if try to ImpersonateLoggedOnUser() using that token it appears to
stay in session 0.

Am I trying to do something which is just impossible by design? It
would sure save me a lot of time if someone could tell me that ;-)
Then I'd go down the CreateProcess() route and have 2 processes and
some IPC.

Thanks.