sperror.h 750 B

1234567891011121314151617181920212223242526
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef SPError_h
  7. #define SPError_h
  8. #include <winapifamily.h>
  9. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  10. #include <winerror.h>
  11. #define FACILITY_SAPI FACILITY_ITF
  12. #define SAPI_ERROR_BASE 0x5000
  13. #define MAKE_SAPI_HRESULT(sev, err) MAKE_HRESULT(sev, FACILITY_SAPI, err)
  14. #define MAKE_SAPI_ERROR(err) MAKE_SAPI_HRESULT(SEVERITY_ERROR, err+SAPI_ERROR_BASE)
  15. #define MAKE_SAPI_SCODE(scode) MAKE_SAPI_HRESULT(SEVERITY_SUCCESS, scode+SAPI_ERROR_BASE)
  16. #define SPERR_NOT_FOUND MAKE_SAPI_ERROR(0x003a)
  17. #endif
  18. #endif