| 112 | } |
| 113 | |
| 114 | void __stdcall EnableCallback( |
| 115 | LPCGUID, // SourceId |
| 116 | ULONG ControlCode, |
| 117 | UCHAR Level, |
| 118 | ULONGLONG MatchAnyKeyword, |
| 119 | ULONGLONG MatchAllKeyword, |
| 120 | PEVENT_FILTER_DESCRIPTOR, // FilterData |
| 121 | PVOID CallbackContext) |
| 122 | { |
| 123 | auto ctxt = (PresentMonProvider*) CallbackContext; |
| 124 | if (ctxt != nullptr) { |
| 125 | switch (ControlCode) { |
| 126 | case EVENT_CONTROL_CODE_ENABLE_PROVIDER: |
| 127 | ctxt->EnableBits = 0; |
| 128 | if (Level == 0 || Level >= TRACE_LEVEL_INFORMATION) { |
| 129 | for (uint32_t i = 0; i < Event_Count; ++i) { |
| 130 | ULONG bit = KeywordIsEnabled(EventDescriptor[i].Keyword, MatchAnyKeyword, MatchAllKeyword) ? 1u : 0u; |
| 131 | ctxt->EnableBits |= (bit << i); |
| 132 | } |
| 133 | } |
| 134 | break; |
| 135 | |
| 136 | case EVENT_CONTROL_CODE_DISABLE_PROVIDER: |
| 137 | ctxt->EnableBits = 0; |
| 138 | break; |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | void FillDesc(EVENT_DATA_DESCRIPTOR*) {} |
| 144 |
nothing calls this directly
no test coverage detected