mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 11:39:16 +08:00
25 lines
493 B
C++
25 lines
493 B
C++
#include "pch.h"
|
|
|
|
#include <iostream>
|
|
|
|
int wmain(int argc, WCHAR** argv)
|
|
{
|
|
auto paths_to_check = ipc::read_paths_from_stdin();
|
|
|
|
auto result = find_processes_nonrecursive(paths_to_check);
|
|
|
|
if (result.empty())
|
|
{
|
|
std::wcout << L"No processes are using these files.\n";
|
|
}
|
|
else
|
|
{
|
|
for (auto process_info : result)
|
|
{
|
|
std::wcout << L"[" << process_info.pid << L"] " << process_info.name << L'\n';
|
|
}
|
|
}
|
|
|
|
Sleep(INFINITE);
|
|
}
|