Show User name

This commit is contained in:
Ivan Stošić 2022-10-05 15:26:40 +02:00
parent c7f6eda05a
commit 5556107301
2 changed files with 8 additions and 1 deletions

View File

@ -92,5 +92,11 @@ namespace FileLocksmith::Interop
return wait_result == WAIT_OBJECT_0;
}
static System::String^ PidToUser(System::UInt32 pid)
{
auto user_cpp = pid_to_user(pid);
return from_wstring_view(user_cpp);
}
};
}

View File

@ -34,7 +34,8 @@ namespace FileLocksmithUI
processPid.Text = PowerToys.FileLocksmithUI.Properties.Resources.ProcessId + ": " + pid;
processFileCount.Text = PowerToys.FileLocksmithUI.Properties.Resources.FilesUsed + ": " + numFiles;
processUser.Text = PowerToys.FileLocksmithUI.Properties.Resources.User + ": " + "<TODO PID TO USER>";
processUser.Text = PowerToys.FileLocksmithUI.Properties.Resources.User + ": " +
FileLocksmith.Interop.NativeMethods.PidToUser(pid);
}
public void AddPath(string path)