From 0dc07e2d237eb783635ec8d555561d941b848615 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 19 Oct 2000 20:30:37 +0000 Subject: [PATCH] Added the {HRESULT,SCODE}_SEVERITY macros. --- include/winerror.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/winerror.h b/include/winerror.h index 52bed2cec0b..40240b136dc 100644 --- a/include/winerror.h +++ b/include/winerror.h @@ -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))