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:

SymbolicCodeDescription
S_OK0x00000000Operation successful
E_ABORT0x80004004Operation aborted
E_ACCESSDENIED0x80070005General access denied error
E_FAIL0x80004005Unspecified failure
E_HANDLE0x80070006Handle that is not valid
E_INVALIDARG0x80070057One or more arguments are not valid
E_NOINTERFACE0x80004002No such interface supported
E_NOTIMPL0x80004001Not implemented
E_OUTOFMEMORY0x8007000EFailed to allocate necessary memory
E_POINTER0x80004003Pointer that is not valid
E_UNEXPECTED0x8000FFFFUnexpected 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.