Sync with trunk (r48545)
[reactos.git] / include / psdk / stierr.h
1
2
3
4 #ifndef _STIERR_
5 #define _STIERR_
6
7 #define NT_SUCCESS(Status) ((NTSTATUS)(Status) >= 0)
8 #define NT_INFORMATION(Status) ((ULONG)(Status) >> 30 == 1)
9 #define NT_WARNING(Status) ((ULONG)(Status) >> 30 == 2)
10 #define NT_ERROR(Status) ((ULONG)(Status) >> 30 == 3)
11 #define STI_OK S_OK
12 #define STI_ERROR_NO_ERROR STI_OK
13 #define STI_NOTCONNECTED S_FALSE
14 #define STI_CHANGENOEFFECT S_FALSE
15 #define STIERR_OLD_VERSION MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_OLD_WIN_VERSION)
16 #define STIERR_BETA_VERSION MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_RMODE_APP)
17 #define STIERR_BADDRIVER MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_BAD_DRIVER_LEVEL)
18 #define STIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
19 #define STIERR_OBJECTNOTFOUND MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_FILE_NOT_FOUND)
20 #define STIERR_INVALID_PARAM E_INVALIDARG
21 #define STIERR_NOINTERFACE E_NOINTERFACE
22 #define STIERR_GENERIC E_FAIL
23 #define STIERR_OUTOFMEMORY E_OUTOFMEMORY
24 #define STIERR_UNSUPPORTED E_NOTIMPL
25 #define STIERR_NOT_INITIALIZED MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_NOT_READY)
26 #define STIERR_ALREADY_INITIALIZED MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_ALREADY_INITIALIZED)
27 #define STIERR_DEVICE_LOCKED MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_LOCK_VIOLATION)
28 #define STIERR_READONLY E_ACCESSDENIED
29 #define STIERR_NOTINITIALIZED E_ACCESSDENIED
30 #define STIERR_NEEDS_LOCK MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_NOT_LOCKED)
31 #define STIERR_SHARING_VIOLATION MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_SHARING_VIOLATION)
32 #define STIERR_HANDLEEXISTS MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_ALREADY_EXISTS)
33 #define STIERR_INVALID_DEVICE_NAME MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_INVALID_NAME)
34 #define STIERR_INVALID_HW_TYPE MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_INVALID_DATA)
35 #define STIERR_INVALID_HW_TYPE MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_INVALID_DATA)
36 #define STIERR_NOEVENTS MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_NO_MORE_ITEMS)
37 #define STIERR_DEVICE_NOTREADY MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_NOT_READY)
38 #endif
39