Consider I have the following handle for process:
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, entry.th32ProcessID);
How can I get process's SID? It's necessary as I need to give permission for this process to some file. I thought that maybe GetSecurityInfo() might help, however I have no idea how to use it for process. To be more specific, I don't know how to specify SE_OBJECT_TYPE (2nd parameter).
According to the Doc: SID structure (winnt.h)
As far as I'm concerned, you couldn't get process's SID.