HRESULTs
The return value of COM functions and methods is an HRESULT. The values of some HRESULTs have been changed in COM to eliminate all duplication and overlapping with Win32 error codes. Those that duplicate Win32 error codes have been changed to FACILITY_WIN32, and those that overlap remain in FACILITY_NULL. Common HRESULTs and their 32-bit values are listed in the following table.
HRESULT | Value | Description |
---|---|---|
E_ABORT |
0x80004004 |
The operation was aborted because of an unspecified error. |
E_ACCESSDENIED |
0x80070005 |
A general access-denied error. |
E_FAIL |
0x80004005 |
An unspecified failure has occurred. |
E_HANDLE |
0x80070006 |
An invalid handle was used. |
E_INVALIDARG |
0x80070057 |
One or more arguments are invalid. |
E_NOINTERFACE |
0x80004002 |
The QueryInterface method did not recognize the requested interface. The interface is not supported. |
E_NOTIMPL |
0x80004001 |
The method is not implemented. |
E_OUTOFMEMORY |
0x8007000E |
The method failed to allocate necessary memory. |
E_PENDING |
0x8000000A |
The data necessary to complete the operation is not yet available. |
E_POINTER |
0x80004003 |
An invalid pointer was used. |
E_UNEXPECTED |
0x8000FFFF |
A catastrophic failure has occurred. |
S_FALSE |
0x00000001 |
The method succeeded and returned the boolean value FALSE. |
S_OK |
0x00000000 |
The method succeeded. If a boolean return value is expected, the returned value is TRUE. |
Requirements
To use the return values, you must include winerror.h in your project.