MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / EnumProcesses

Method EnumProcesses

WinSysCore/TraceManager.cpp:150–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void 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
169void TraceManager::RemoveAllFilters() {
170 _filters.clear();

Callers 5

CreateObjectTypeMethod · 0.45
RefreshMethod · 0.45
CNetwrokTableMethod · 0.45
OnRefreshMethod · 0.45
RefreshMethod · 0.45

Calls 2

clearMethod · 0.80
reserveMethod · 0.80

Tested by

no test coverage detected