| 40 | |
| 41 | template<DWMWINDOWATTRIBUTE attrib> |
| 42 | inline std::optional<typename attrib_return_type<attrib>::type> get_attribute() const |
| 43 | { |
| 44 | typename attrib_return_type<attrib>::type val; |
| 45 | const HRESULT hr = DwmGetWindowAttribute(m_WindowHandle, attrib, &val, sizeof(val)); |
| 46 | if (SUCCEEDED(hr)) |
| 47 | { |
| 48 | return val; |
| 49 | } |
| 50 | else |
| 51 | { |
| 52 | HresultHandle(hr, spdlog::level::info, L"Failed to get window attribute."); |
| 53 | return std::nullopt; |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | static std::optional<std::filesystem::path> TryGetNtImageName(DWORD pid); |
| 58 |
nothing calls this directly
no outgoing calls
no test coverage detected