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

Method OnMonitorStart

WinArk/MainFrame.cpp:578–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576}
577
578LRESULT CMainFrame::OnMonitorStart(WORD, WORD, HWND, BOOL&) {
579 m_pEtwView->StartMonitoring(m_tm, true);
580 bool isWin8Plus = ::IsWindows8OrGreater();
581 if (isWin8Plus) {
582 m_tm.Start([&](auto data) {
583 m_pEtwView->AddEvent(data);
584 });
585 }
586 else {
587 DWORD flags = 0;
588 for (auto type : m_tm.GetKernelEventTypes()) {
589 flags |= (DWORD)type;
590 }
591 if (flags == 0)
592 flags = (DWORD)KernelEventTypes::Process;
593 m_tm.Start([&](auto data) {
594 m_pEtwView->AddEvent(data);
595 }, flags);
596 }
597
598 ClearToolBarButtons(m_tb);
599 InitEtwToolBar(m_tb);
600
601 SetTimer(1, 5000, nullptr);
602 SetPaneIcon(1, m_RunIcon);
603 return 0;
604}
605
606LRESULT CMainFrame::OnMonitorStop(WORD, WORD, HWND, BOOL&) {
607 KillTimer(1);

Callers

nothing calls this directly

Calls 4

StartMonitoringMethod · 0.80
AddEventMethod · 0.80
GetKernelEventTypesMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected