| 164 | |
| 165 | |
| 166 | void 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 | |
| 191 | CString CProcessHandleTable::HandleAttributesToString(ULONG attributes) { |
| 192 | CString result; |
nothing calls this directly
no test coverage detected