Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.2 KiB

  1. //
  2. // CalcErr.h
  3. //
  4. // Defines the error codes thrown by ratpak and caught by Calculator
  5. //
  6. //
  7. // Ratpak errors are 32 bit values layed out as follows:
  8. //
  9. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  10. // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  11. // +-+-------+---------------------+-------------------------------+
  12. // |S| R | Facility | Code |
  13. // +-+-------+---------------------+-------------------------------+
  14. //
  15. // where
  16. //
  17. // S - Severity - indicates success/fail
  18. //
  19. // 0 - Success
  20. // 1 - Fail
  21. //
  22. // R - Reserved - not currently used for anything
  23. //
  24. // r - reserved portion of the facility code. Reserved for internal
  25. // use. Used to indicate HRESULT values that are not status
  26. // values, but are instead message ids for display strings.
  27. //
  28. // Facility - is the facility code
  29. //
  30. // Code - is the actual error code
  31. //
  32. // This format is based losely on an OLE HRESULT and is compatible with the
  33. // SUCCEEDED and FAILED marcos as well as the HRESULT_CODE macro
  34. // CALC_E_DIVIDEBYZERO
  35. //
  36. // The current operation would require a divide by zero to complete
  37. #define CALC_E_DIVIDEBYZERO ((DWORD)0x80000000)
  38. // CALC_E_DOMAIN
  39. //
  40. // The given input is not within the domain of this function
  41. #define CALC_E_DOMAIN ((DWORD)0x80000001)
  42. // CALC_E_INDEFINITE
  43. //
  44. // The result of this function is undefined
  45. #define CALC_E_INDEFINITE ((DWORD)0x80000002)
  46. // CALC_E_POSINFINITY
  47. //
  48. // The result of this function is Positive Infinity.
  49. #define CALC_E_POSINFINITY ((DWORD)0x80000003)
  50. // CALC_E_NEGINFINITY
  51. //
  52. // The result of this function is Negative Infinity
  53. #define CALC_E_NEGINFINITY ((DWORD)0x80000004)
  54. // CALC_E_ABORTED
  55. //
  56. // The user aborted the completion of this function
  57. #define CALC_E_ABORTED ((DWORD)0x80000005)
  58. // CALC_E_INVALIDRANGE
  59. //
  60. // The given input is within the domain of the function but is beyond
  61. // the range for which calc can successfully compute the answer
  62. #define CALC_E_INVALIDRANGE ((DWORD)0x80000006)
  63. // CALC_E_OUTOFMEMORY
  64. //
  65. // There is not enough free memory to complete the requested function
  66. #define CALC_E_OUTOFMEMORY ((DWORD)0x80000007)