Added IS_ERROR.

diff --git a/include/winerror.h b/include/winerror.h
index 8bbeed2..b957a94 100644
--- a/include/winerror.h
+++ b/include/winerror.h
@@ -26,6 +26,7 @@
         ((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)