Added the {HRESULT,SCODE}_SEVERITY macros.

oldstable
Francois Gouget 2000-10-19 20:30:37 +00:00 committed by Alexandre Julliard
parent 81800b1f6d
commit 0dc07e2d23
1 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,9 @@ extern int WIN32_LastError;
#define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1FFF)
#define SCODE_FACILITY(sc) (((sc) >> 16) & 0x1FFF)
#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1)
#define SCODE_SEVERITY(sc) (((sc) >> 31) & 0x1)
#define FACILITY_NT_BIT 0x10000000
#define HRESULT_FROM_WIN32(x) ((x) ? ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)) : 0 )
#define HRESULT_FROM_NT(x) ((HRESULT) ((x) | FACILITY_NT_BIT))