win32ts.ProcessIdToSessionId

int = ProcessIdToSessionId(ProcessId)

Finds the session under which a process is running

Parameters

ProcessId : int

Id of a process as returned by win32ts::WTSEnumerateProcesses