SCODE
4/8/2010
The SCODE data-type is a 32-bit value that specifies a particular warning or error code.
Note
Like COM methods and functions, many MAPI functions and methods return SCODE values defined as HRESULT data types.
Syntax
ULONG SCODE;
Remarks
An SCODE value is contained in a single 32-bit ULONG variable. The following figure represents an SCODE value.
The following table shows how to decode the information contained in an SCODE.
Section | Description | Size in bits | Interpretation |
---|---|---|---|
Sev |
The severity code |
2 |
Specifies either success, or the kind of error. 00 - Success. |
C |
The customer code flag |
1 |
0 - Is not a customer code. 1 - Is a customer code. |
R |
A reserved bit |
1 |
Ignore. |
Facility |
The facility code |
12 |
Specifies the software component that defines this error code. For example, FACILITY_STORAGE. EE - RTC interface codes. |
Code |
The facility's status code |
16 |
A code describing the error or warning. For example, ERROR_PATH_NOT_FOUND. See System Errors - Numerical Order for a listing of possible system error values. |
Definitions for error and warning codes is contained in the winerror.h
header file.
On 32-bit platforms, the SCODE data type is the same as the HRESULT data type.
For more information on error and warning codes, see Error Values, and the Structure on MSDN.