1 2 3 4 5 6 7
use windows::core::HRESULT; pub fn check_hresult(h: HRESULT) { if h.is_err() { panic!("{}", h.message()); } }