Leaked source code of windows server 2003
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.

135 lines
5.0 KiB

  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Filename : FTFError.h
  4. // Purpose : This file contains the definition to ftfs returned errors.
  5. //
  6. // Project : FTFS
  7. // Component: Common
  8. //
  9. // Author : urib (Copied from mapicode.h)
  10. //
  11. // Log:
  12. // Jul 15 1996 urib Creation
  13. // Oct 15 1996 urib Add some errors.
  14. // Feb 3 1997 urib Declare the map from Win32 error to HRESULT.
  15. // Sep 16 1997 urib Add time out error.
  16. // Feb 26 1998 urib Move FTF_STATUS error constants from comdefs.
  17. // Mar 11 1998 dovh Add FTF_STATUS_REQUEST_QUEUE_ALMOST_FULL status.
  18. // May 11 1999 dovh Add FTF_E_ALREADY_INITIALIZED status.
  19. // Jul 26 1999 urib Fix constants names.
  20. // Feb 17 2000 urib Add unsupported type error.
  21. // Feb 21 2000 urib Add unsupported like operator error.
  22. // Feb 21 2000 urib Add noise word only query error.
  23. //
  24. ////////////////////////////////////////////////////////////////////////////////
  25. #ifndef FTFERROR_H
  26. #define FTFERROR_H
  27. #include <winerror.h>
  28. /*
  29. * On Windows NT 3.5 and Windows 95, scodes are 32-bit values
  30. * laid out as follows:
  31. *
  32. * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  33. * 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
  34. * +-+-+-+-+-+---------------------+-------------------------------+
  35. * |S|R|C|N|r| Facility | Code |
  36. * +-+-+-+-+-+---------------------+-------------------------------+
  37. *
  38. * where
  39. *
  40. * S - Severity - indicates success/fail
  41. *
  42. * 0 - Success
  43. * 1 - Fail (COERROR)
  44. *
  45. * R - reserved portion of the facility code, corresponds to NT's
  46. * second severity bit.
  47. *
  48. * C - reserved portion of the facility code, corresponds to NT's
  49. * C field.
  50. *
  51. * N - reserved portion of the facility code. Used to indicate a
  52. * mapped NT status value.
  53. *
  54. * r - reserved portion of the facility code. Reserved for internal
  55. * use. Used to indicate HRESULT values that are not status
  56. * values, but are instead message ids for display strings.
  57. *
  58. * Facility - is the facility code
  59. * FACILITY_NULL 0x0
  60. * FACILITY_RPC 0x1
  61. * FACILITY_DISPATCH 0x2
  62. * FACILITY_STORAGE 0x3
  63. * FACILITY_ITF 0x4
  64. * FACILITY_WIN32 0x7
  65. * FACILITY_WINDOWS 0x8
  66. *
  67. * Code - is the facility's status code
  68. *
  69. */
  70. #define FACILITY_FTFS 0x20
  71. /* We do succeed sometimes... */
  72. #define FTF_SUCCESS 0L
  73. /*
  74. * We can't use OLE 2.0 macros to build sCodes because the definition has
  75. * changed and we wish to conform to the new definition.
  76. */
  77. #define MAKE_FTF_SCODE(sev,fac,code) \
  78. ((SCODE) (((unsigned long)(sev)<<31) | \
  79. ((unsigned long)(fac)<<16) | \
  80. ((unsigned long)(code) ) ))
  81. /* The following two macros are used to build OLE 2.0 style sCodes */
  82. #define MAKE_FTF_E( err ) (MAKE_FTF_SCODE( 1, FACILITY_FTFS, err ))
  83. #define MAKE_FTF_S( warn ) (MAKE_FTF_SCODE( 0, FACILITY_FTFS, warn ))
  84. /* General errors */
  85. #define FTF_E_NOT_ENOUGH_MEMORY E_OUTOFMEMORY
  86. #define FTF_E_INVALID_PARAMETER E_INVALIDARG
  87. #define FTF_E_BAD_FORMAT MAKE_FTF_E(ERROR_BAD_FORMAT)
  88. #define FTF_E_INTERNAL_ERROR MAKE_FTF_E(ERROR_INTERNAL_ERROR)
  89. #define FTF_E_ITEM_NOT_FOUND MAKE_FTF_E(ERROR_FILE_NOT_FOUND)
  90. #define FTF_E_ITEM_ALREADY_EXISTS MAKE_FTF_E(ERROR_FILE_EXISTS)
  91. #define FTF_E_ALREADY_INITIALIZED MAKE_FTF_E(ERROR_ALREADY_INITIALIZED)
  92. #define FTF_E_TIMEOUT MAKE_FTF_E(ERROR_SEM_TIMEOUT)
  93. #define FTF_E_NOT_INITIALIZED MAKE_FTF_E(OLE_E_BLANK)
  94. #define FTF_E_TOO_BIG MAKE_FTF_E( 0x302 )
  95. #define FTF_E_NO_ICORPUSSTATISTICS MAKE_FTF_E( 0x303 )
  96. #define FTF_E_QUERY_SETS_FULL MAKE_FTF_E( 0x304 )
  97. #define FTF_W_PARTIAL_COMPLETION MAKE_FTF_S( 0x313 )
  98. #define FTF_W_ALREADY_INITIALIZED MAKE_FTF_S( 0x314 )
  99. //
  100. // FTF_STATUS_ MACRO DEFINITIONS:
  101. //
  102. #define FTF_E_EXPRESSION_PARSING_ERROR MAKE_FTF_E(12)
  103. #define FTF_E_PATTERN_TOO_SHORT MAKE_FTF_E(21)
  104. #define FTF_E_PATTERN_TOO_LONG MAKE_FTF_E(22)
  105. #define FTF_E_UNSUPPORTED_PROPERTY_TYPE MAKE_FTF_E(24)
  106. #define FTF_E_UNSUPPORTED_REGEXP_OP MAKE_FTF_E(25)
  107. #define FTF_E_TOO_MANY_PROPERTIES MAKE_FTF_E(26)
  108. #define FTF_E_TOO_MANY_SPECIFIC_ALL MAKE_FTF_E(27)
  109. #define FTF_E_ONLY_NOISE_WORDS ((HRESULT)0x80041605L)//QUERY_E_ALLNOISE
  110. //
  111. // XML STACK ETC...
  112. //
  113. #define FTF_E_STACK_EMPTY MAKE_FTF_E(201)
  114. #define FTF_E_STACK_UNDERFLOW MAKE_FTF_E(202)
  115. #endif // FTFERROR_H