+ Reply to Thread
Results 1 to 2 of 2

Thread: How to identify session ID of a process?

  1. #1

    How to identify session ID of a process?


    I have process handle and process ID.

    Now I need to know the session ID the process is associated with.

    What is the way that I should use?

  2. #2
    Junior Member
    Join Date
    Apr 2012
    DWORD dwSessionIDOfAnotherProcess = -1 ;
    ProcessIdToSessionId(dwProdessID, &dwSessionIDOfAnotherProcess) ;
    dwSessionIDOfAnotherProcess the session id for this process.

    ProcessIdToSessionId is what you are looking for, I think.

+ Reply to Thread

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts