public static PrivilegeAndAttributesCollection GetPrivileges(this Process process)
 {
     using (AccessTokenHandle accessTokenHandle = new AccessTokenHandle(
                new ProcessHandle(process.Handle, false),
                TokenAccessRights.Query))
     {
         return(Privileges.GetPrivileges(accessTokenHandle));
     }
 }
 public static PrivilegeAndAttributesCollection GetPrivileges(this AccessTokenHandle accessTokenHandle)
 {
     return(Privileges.GetPrivileges(accessTokenHandle));
 }