---
id: "hresult"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["software"]
langs: ["common"]
quality: 80
url: "https://registry.apicrafter.io/datatype/hresult"
---

# Windows HRESULT value (`hresult`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

32-bit result code with which Windows APIs and COM report the success or failure of an operation. Documentation, logs and error dialogs write it as 0x and eight hexadecimal digits. Failure codes have the highest bit set, so they start with 0x8 or a higher digit. The header file Winerror.h defines the values.

- Personal data (PII): no
- Categories: Software development (software)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^0x[0-9A-Fa-f]{8}$
```

## Examples

- `0x80070005` — E_ACCESSDENIED, general access denied error
- `0x80004005` — E_FAIL, unspecified failure
- `0x8007000E` — E_OUTOFMEMORY
- `0x00000000` — S_OK, operation successful
- `0x5` (invalid example) — Short form of a system error code

## Translations

- ru: Код результата HRESULT (Windows)

## Sources

- doc: <https://learn.microsoft.com/en-us/windows/win32/seccrypto/common-hresult-values>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/hresult.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/software/hresult.yaml>
