TpcError.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2002.
  5. //
  6. // File: TPCError.h
  7. // Microsoft Tablet PC API Error Code definitions
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _WINERROR_
  11. #include <winerror.h>
  12. #endif
  13. /*** TPC_E_INVALID_PROPERTY 0x80040241 -2147220927
  14. * The property was not found, or supported by the recognizer.
  15. */
  16. #define TPC_E_INVALID_PROPERTY MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x241)
  17. /*** TPC_E_NO_DEFAULT_TABLET 0x80040212 -2147220974
  18. * No default tablet.
  19. */
  20. #define TPC_E_NO_DEFAULT_TABLET MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x212)
  21. /*** TPC_E_UNKNOWN_PROPERTY 0x8004021b -2147220965
  22. * Unknown property specified.
  23. */
  24. #define TPC_E_UNKNOWN_PROPERTY MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x21b)
  25. /*** TPC_E_INVALID_INPUT_RECT 0x80040219 -2147220967
  26. * An invalid input rectangle was specified.
  27. */
  28. #define TPC_E_INVALID_INPUT_RECT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x219)
  29. /*** TPC_E_INVALID_STROKE 0x80040222 -2147220958
  30. * The stroke object was deleted.
  31. */
  32. #define TPC_E_INVALID_STROKE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x222)
  33. /*** TPC_E_INITIALIZE_FAIL 0x80040223 -2147220957
  34. * Initialize failure.
  35. */
  36. #define TPC_E_INITIALIZE_FAIL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x223)
  37. /*** TPC_E_NOT_RELEVANT 0x80040232 -2147220942
  38. * The data required for the operation was not supplied.
  39. */
  40. #define TPC_E_NOT_RELEVANT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x232)
  41. /*** TPC_E_RECOGNIZER_NOT_REGISTERED 0x80040235 -2147220939
  42. * There are no Recognizers registered.
  43. */
  44. #define TPC_E_RECOGNIZER_NOT_REGISTERED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x235)
  45. /*** TPC_E_INVALID_RIGHTS 0x80040236 -2147220938
  46. * User does not have the necessary rights to read recognizer information.
  47. */
  48. #define TPC_E_INVALID_RIGHTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x236)
  49. /*** TPC_E_OUT_OF_ORDER_CALL 0x80040237 -2147220937
  50. * API calls were made in an incorrect order.
  51. */
  52. #define TPC_E_OUT_OF_ORDER_CALL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x237)
  53. /*** TPC_E_QUEUE_FULL 0x80040238 -2147220936
  54. * Queue is full.
  55. */
  56. #define TPC_E_QUEUE_FULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x238)
  57. /*** TPC_E_INVALID_CONFIGURATION 0x80040239 -2147220935
  58. * RtpEnabled called multiple times.
  59. */
  60. #define TPC_E_INVALID_CONFIGURATION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x239)
  61. #define FACILITY_INK 40
  62. #define INK_ERROR_BASE 0x0000
  63. #define MAKE_INK_HRESULT(sev, err) MAKE_HRESULT(sev,FACILITY_INK,err)
  64. #define MAKE_INK_ERROR(err) MAKE_INK_HRESULT(SEVERITY_ERROR,err+INK_ERROR_BASE)
  65. #define MAKE_INK_SCODE(scode) MAKE_INK_HRESULT(SEVERITY_SUCCESS,scode+INK_ERROR_BASE)
  66. // IErrorInfo helper for objects that support error info (CLSID_IFoo && IID_IFoo)
  67. #define MAKE_OBJ_ERROR_INFO( ID, hr, helpid, helpfile ) \
  68. AtlReportError( CLSID_##ID , IDS_##hr, \
  69. helpid, helpfile, \
  70. IID_I##ID, hr, \
  71. _Module.GetModuleInstance())
  72. // IErrorInfo helper for interfaces that support error info, but are not cocreatable
  73. // (e.g. IID_IFoo, but NOT CLSID_IFoo)
  74. #define MAKE_INT_ERROR_INFO( ID, hr, helpid, helpfile ) \
  75. AtlReportError( GUID_NULL , IDS_##hr, \
  76. helpid, helpfile, \
  77. IID_I##ID, hr, \
  78. _Module.GetModuleInstance())
  79. /*** E_INK_EXCEPTION 0x80280001 -2144862207
  80. * An internal exception occurred while executing the method or property.
  81. */
  82. #define E_INK_EXCEPTION MAKE_INK_ERROR(0x001)
  83. /*** E_INK_MISMATCHED_INK_OBJECT 0x80280002 -2144862206
  84. * The object is already associated with an ink object and cannot be reassociated.
  85. */
  86. #define E_INK_MISMATCHED_INK_OBJECT MAKE_INK_ERROR(0x002)
  87. /*** E_INK_COLLECTOR_BUSY 0x80280003 -2144862205
  88. * The operation cannot be performed while the user is actively inking.
  89. */
  90. #define E_INK_COLLECTOR_BUSY MAKE_INK_ERROR(0x003)
  91. /*** E_INK_INCOMPATIBLE_OBJECT 0x80280004 -2144862204
  92. * The interface pointer points to an object that is incompatible with the Ink API
  93. */
  94. #define E_INK_INCOMPATIBLE_OBJECT MAKE_INK_ERROR(0x004)
  95. /*** E_INK_WINDOW_NOT_SET 0x80280005 -2144862203
  96. * The window handle must be set before ink collection can occur.
  97. */
  98. #define E_INK_WINDOW_NOT_SET MAKE_INK_ERROR(0x005)
  99. /*** E_INK_INVALID_MODE 0x80280006 -2144862202
  100. * The InkCollector must be gesture mode for gesture features,
  101. and single tablet mode for single tablet features.
  102. */
  103. #define E_INK_INVALID_MODE MAKE_INK_ERROR(0x006)
  104. /*** E_INK_COLLECTOR_ENABLED 0x80280007 -2144862201
  105. * The operation cannot be performed while the InkCollector is enabled.
  106. */
  107. #define E_INK_COLLECTOR_ENABLED MAKE_INK_ERROR(0x007)
  108. /*** E_INK_NO_STROKES_TO_RECOGNIZE 0x80280008 -2144862200
  109. * There are no strokes for the recognizer to process.
  110. */
  111. #define E_INK_NO_STROKES_TO_RECOGNIZE MAKE_INK_ERROR(0x008)
  112. /*** E_INK_EMPTY_RECOGNITION_RESULT 0x80280009 -2144862199
  113. * There are no strokes for the recognizer to process.
  114. */
  115. #define E_INK_EMPTY_RECOGNITION_RESULT MAKE_INK_ERROR(0x009)
  116. /*** E_INK_OVERLAPPING_INPUT_RECT 0x80280010 -2144862192
  117. * "The window input rectangle overlaps with an enabled InkCollector's window input rectangle."
  118. */
  119. #define E_INK_OVERLAPPING_INPUT_RECT MAKE_INK_ERROR(0x010)
  120. // Recognizer Engine Driver Error Codes
  121. /*** TPC_E_INVALID_PACKET_DESCRIPTION 0x80040233 -2147220941
  122. * Invalid packet description.
  123. */
  124. #define TPC_E_INVALID_PACKET_DESCRIPTION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x233)
  125. #define TPC_E_INSUFFICIENT_BUFFER __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
  126. //
  127. // Definition of Success codes
  128. //
  129. #define TPC_S_TRUNCATED MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x252)
  130. #define TPC_S_INTERRUPTED MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x253)