This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A 32-bit value that is used to describe an error or warning.
The HRESULT data type is the same as the SCODE data type.
An HRESULT value consists of the following fields:
A 1-bit code indicating severity, where zero represents success and 1 represents failure.
A 4-bit reserved value.
An 11-bit code indicating responsibility for the error or warning, also known as a facility code.
A 16-bit code describing the error or warning.
Most MAPI interface methods and functions return HRESULT values to provide detailed cause formation. HRESULT values are also used widely in OLE interface methods. OLE provides several macros for converting between HRESULT values and SCODE values, another common data type for error handling.
For information about the OLE use of HRESULT values, see the OLE Programmer's Reference. For more information about the use of these values in MAPI, see Error Handling and any of the following interface methods: