Cast E_* errors to HRESULT (same as defined in WIN32 API)
#define NO_ERROR 0
#endif
-#define E_UNEXPECTED 0x8000FFFF
-#define E_NOTIMPL 0x80004001
-#define E_OUTOFMEMORY 0x8007000E
-#define E_INVALIDARG 0x80070057
-#define E_NOINTERFACE 0x80004002
-#define E_POINTER 0x80004003
-#define E_HANDLE 0x80070006
-#define E_ABORT 0x80004004
-#define E_FAIL 0x80004005
-#define E_ACCESSDENIED 0x80070005
+#define E_UNEXPECTED (HRESULT)0x8000FFFFL
+#define E_NOTIMPL (HRESULT)0x80004001L
+#define E_OUTOFMEMORY (HRESULT)0x8007000EL
+#define E_INVALIDARG (HRESULT)0x80070057L
+#define E_NOINTERFACE (HRESULT)0x80004002L
+#define E_POINTER (HRESULT)0x80004003L
+#define E_HANDLE (HRESULT)0x80070006L
+#define E_ABORT (HRESULT)0x80004004L
+#define E_FAIL (HRESULT)0x80004005L
+#define E_ACCESSDENIED (HRESULT)0x80070005L
#define CO_E_INIT_TLS 0x80004006
#define CO_E_INIT_SHARED_ALLOCATOR 0x80004007
