From e533a3f1300511c9283d6293807fcc33bf85a2d2 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 7 May 2001 18:14:10 +0000 Subject: [PATCH] Added IS_ERROR. --- include/winerror.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/winerror.h b/include/winerror.h index 8bbeed23272..b957a94d6ab 100644 --- a/include/winerror.h +++ b/include/winerror.h @@ -26,6 +26,7 @@ extern int WIN32_LastError; ((SCODE) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) ) #define SUCCEEDED(stat) ((HRESULT)(stat)>=0) #define FAILED(stat) ((HRESULT)(stat)<0) +#define IS_ERROR(stat) (((unsigned long)(stat)>>31) == SEVERITY_ERROR) #define HRESULT_CODE(hr) ((hr) & 0xFFFF) #define SCODE_CODE(sc) ((sc) & 0xFFFF)