title: How do I get the SID / session of an arbitrary process?
body: <p>I'm writing a program to enumerate through processes, and I want to find out the SID/user ID and session of which the specified process is running under (i.e. i <em>have</em> a PID/handle to process, I <em>want</em> the SID and session it's running under). Any clues?</p>