MCPcopy Index your code
hub / github.com/RustPython/RustPython / hresult_from_win32

Function hresult_from_win32

crates/vm/src/stdlib/_wmi.rs:259–265  ·  view source on GitHub ↗
(err: u32)

Source from the content-addressed store, hash-verified

257 const BUFFER_SIZE: usize = 8192;
258
259 fn hresult_from_win32(err: u32) -> HRESULT {
260 if err == 0 {
261 0
262 } else {
263 ((err & 0xFFFF) | 0x80070000) as HRESULT
264 }
265 }
266
267 fn succeeded(hr: HRESULT) -> bool {
268 hr >= 0

Callers 1

query_thread_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected