| 39 | } |
| 40 | |
| 41 | void CEtwView::StartMonitoring(TraceManager& tm, bool start) { |
| 42 | if (start) { |
| 43 | std::vector<KernelEventTypes> types; |
| 44 | std::vector<std::wstring> categories; |
| 45 | for (auto& cat : m_EventsConfig.GetCategories()) { |
| 46 | auto c = KernelEventCategory::GetCategory(cat.Name.c_str()); |
| 47 | ATLASSERT(c); |
| 48 | types.push_back(c->EnableFlag); |
| 49 | categories.push_back(c->Name); |
| 50 | } |
| 51 | std::initializer_list<KernelEventTypes> events(types.data(), types.data() + types.size()); |
| 52 | tm.SetKernelEventTypes(events); |
| 53 | tm.SetKernelEventStacks(std::initializer_list<std::wstring>(categories.data(), categories.data() + categories.size())); |
| 54 | ApplyFilters(m_FilterConfig); |
| 55 | } |
| 56 | else { |
| 57 | m_IsDraining = true; |
| 58 | } |
| 59 | m_IsMonitoring = start; |
| 60 | } |
| 61 | |
| 62 | CString CEtwView::GetColumnText(HWND, int row, int col) const { |
| 63 | auto item = m_Events[row].get(); |
no test coverage detected