How to get name of owner of a process?

Here is a function that extracts the name of the owner of a process… [sourcecode language=’cpp’]bool ExtractProcessOwner( HANDLE hProcess_i,                           CString& csOwner_o ) {    // Get process token    HANDLE hProcessToken = NULL;    if ( !::OpenProcessToken( hProcess_i, TOKEN_READ, &hProcessToken ) || !hProcessToken )    {       return false;    }    // First get […]
Continue reading…