MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / getProcessTreeFromProcess

Function getProcessTreeFromProcess

src/envmodule.cpp:543–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543Process getProcessTreeFromProcess(HANDLE h)
544{
545 Process root;
546
547 const auto parentPID = ::GetProcessId(h);
548 const auto v = getRunningProcesses();
549
550 for (auto&& p : v) {
551 if (p.pid() == parentPID) {
552 Process child = p;
553 findChildren(child, v);
554 root.addChild(child);
555 break;
556 }
557 }
558
559 return root;
560}
561
562std::vector<DWORD> processesInJob(HANDLE h)
563{

Callers 1

getProcessTreeFunction · 0.85

Calls 4

getRunningProcessesFunction · 0.85
findChildrenFunction · 0.85
addChildMethod · 0.80
pidMethod · 0.45

Tested by

no test coverage detected