SCODE
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 status value that is used to describe an error or warning.
typedef ULONG SCODE;
Remarks
The SCODE data type is the same as the HRESULT data type.
An SCODE value is divided into four fields:
A single-bit severity code which is set to 0 to indicate success and 1 to indicate failure.
An 11-bit reserved field
A 4-bit facility code which indicates the area responsible for the error or warning.
A 16-bit error or warning code which describes the problem that is causing the error or warning.
Many of the MAPI functions and methods return SCODE values defined as HRESULT data types as do the OLE methods and functions. OLE defines several macros that can be used to convert between an SCODE and an HRESULT.
For more information about how MAPI uses the SCODE data type, see Error Handling. For more information about OLE and the SCODE data type, see the OLE Programmer's Reference.