HRESULT
The HRESULT data type is a 32-bit value that is used to describe an error or warning.
Syntax
typedef LONG HRESULT;
Remarks
The HRESULT data type is the same as the SCODE data type. An HRESULT value is made up 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 result information. HRESULT values are also used widely in COM interface methods. COM provides several macros for converting between HRESULT values and SCODE values, another common data type for error handling.
See Also
Send feedback on this topic to the authors.
© 2005 Microsoft Corporation. All rights reserved.