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