MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / winerror

Function winerror

windows/utils/winutils.py:479–486  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

477
478_WINERROR_BY_VALUE = None
479def winerror(code):
480 global _WINERROR_BY_VALUE
481 if not _WINERROR_BY_VALUE: # Lazy init
482 _WINERROR_BY_VALUE = gdef.FlagMapper(*(getattr(gdef, error) for error in gdef.meta.errors))
483 val = _WINERROR_BY_VALUE[code]
484 if val is code: # Not found
485 val = _WINERROR_BY_VALUE[code & 0xffff] # Hresult: extract code (https://en.wikipedia.org/wiki/HRESULT)
486 return val
487
488
489

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected