Common HRESULT Values
HRESULT values are used in Windows programming to indicate the success or failure of operations. They are 32-bit values that can be used to represent both success and error conditions.
Listing of common HRESULT values
The following HRESULT values are the most common. More values are contained in the header file Winerror.h.
Here are the values listed alphabetically by name:
| Symbolic | Code | Description |
|---|---|---|
| S_OK | 0x00000000 | Operation successful |
| E_ABORT | 0x80004004 | Operation aborted |
| E_ACCESSDENIED | 0x80070005 | General access denied error |
| E_FAIL | 0x80004005 | Unspecified failure |
| E_HANDLE | 0x80070006 | Handle that is not valid |
| E_INVALIDARG | 0x80070057 | One or more arguments are not valid |
| E_NOINTERFACE | 0x80004002 | No such interface supported |
| E_NOTIMPL | 0x80004001 | Not implemented |
| E_OUTOFMEMORY | 0x8007000E | Failed to allocate necessary memory |
| E_POINTER | 0x80004003 | Pointer that is not valid |
| E_UNEXPECTED | 0x8000FFFF | Unexpected failure |
| 11 entries | ||
Article text from the Win32 documentation (opens in a new tab), by Microsoft, under the CC BY 4.0 (opens in a new tab) licence.