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

Method Refresh

WinArk/ProcessHandleTable.cpp:166–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164
165
166void CProcessHandleTable::Refresh() {
167 if (m_hProcess && ::WaitForSingleObject(m_hProcess.get(), 0) == WAIT_OBJECT_0) {
168 KillTimer(1);
169 AtlMessageBox(*this, (L"Process " + std::to_wstring(m_Pid) + L" is no longer running.").c_str(), IDS_TITLE, MB_OK | MB_ICONWARNING);
170 return;
171 }
172 m_ObjMgr.EnumHandles(m_HandleType, m_Pid, m_NamedObjectsOnly);
173 if (m_HandleTracker) {
174 m_DetailsCache.clear();
175 m_DetailsCache.reserve(1024);
176 m_Changes.clear();
177 m_Changes.reserve(8);
178 m_HandleTracker->EnumHandles(true);
179 if (!m_Paused)
180 SetTimer(1, 1000, nullptr);
181 }
182 m_ProcMgr.EnumProcesses();
183 m_Table.data.info = m_ObjMgr.GetHandles();
184
185 auto count = static_cast<int>(m_Table.data.info.size());
186 m_Table.data.n = count;
187
188 return;
189}
190
191CString CProcessHandleTable::HandleAttributesToString(ULONG attributes) {
192 CString result;

Callers

nothing calls this directly

Calls 5

clearMethod · 0.80
reserveMethod · 0.80
EnumHandlesMethod · 0.45
EnumProcessesMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected