Windows C++ : Getting the process name from a process ID

It seems the opposite is a better documented problem (e.g. Get Process ID (PID) from process name (string) – C++ Windows API), so just in case some one out there has a Process ID, and needs to translate it into the actual name, here goes: std::string ProcIDtoProcName(std::uint32_t pid) { std::string result = "UNKNOWN"; HANDLE hProcess … Continue reading Windows C++ : Getting the process name from a process ID