dxcerrors.h 1.3 KB

123456789101112131415161718192021222324252627282930
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // //
  3. // dxcerror.h //
  4. // Copyright (C) Microsoft Corporation. All rights reserved. //
  5. // This file is distributed under the University of Illinois Open Source //
  6. // License. See LICENSE.TXT for details. //
  7. // //
  8. // Provides definition of error codes. //
  9. // //
  10. ///////////////////////////////////////////////////////////////////////////////
  11. #ifndef __DXC_ERRORS__
  12. #define __DXC_ERRORS__
  13. #ifndef FACILITY_GRAPHICS
  14. #define FACILITY_GRAPHICS 36
  15. #endif
  16. #define DXC_EXCEPTION_CODE(name, status) \
  17. static constexpr DWORD EXCEPTION_##name = \
  18. (0xc0000000u | (FACILITY_GRAPHICS << 16) | \
  19. (0xff00u | (status & 0xffu)));
  20. DXC_EXCEPTION_CODE(LOAD_LIBRARY_FAILED, 0x00u)
  21. DXC_EXCEPTION_CODE(NO_HMODULE, 0x01u)
  22. DXC_EXCEPTION_CODE(GET_PROC_FAILED, 0x02u)
  23. #undef DXC_EXCEPTION_CODE
  24. #endif