| 113 | } |
| 114 | |
| 115 | std::vector<pmon::AdapterInfo> Kernel::EnumerateAdapters() const |
| 116 | { |
| 117 | HandleMarshalledException_(); |
| 118 | std::lock_guard lk{ mtx }; |
| 119 | if (!pm) { |
| 120 | pmlog_warn("presentmon not initialized"); |
| 121 | return {}; |
| 122 | } |
| 123 | try { return pm->EnumerateAdapters(); } |
| 124 | catch (...) { |
| 125 | pmlog_warn("failed to enumerate adapters, returning empty set"); |
| 126 | return {}; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | void Kernel::SetCapture(bool active) |
| 131 | { |