| 148 | } |
| 149 | |
| 150 | void TraceManager::EnumProcesses() { |
| 151 | wil::unique_handle hSnapshot(::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)); |
| 152 | if (!hSnapshot) |
| 153 | return; |
| 154 | |
| 155 | PROCESSENTRY32 pe; |
| 156 | pe.dwSize = sizeof(pe); |
| 157 | |
| 158 | if (!::Process32First(hSnapshot.get(), &pe)) |
| 159 | return; |
| 160 | |
| 161 | _processes.clear(); |
| 162 | _processes.reserve(512); |
| 163 | |
| 164 | while (::Process32Next(hSnapshot.get(), &pe)) { |
| 165 | _processes.insert({ pe.th32ProcessID,pe.szExeFile }); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | void TraceManager::RemoveAllFilters() { |
| 170 | _filters.clear(); |
no test coverage detected