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.

219 lines
5.8 KiB

  1. /*
  2. * _ S C O D E . H
  3. *
  4. * Status Codes returned by MAPI routines
  5. *
  6. * Copyright 1993-1995 Microsoft Corporation. All Rights Reserved.
  7. */
  8. #ifndef _SCODE_H
  9. #define _SCODE_H
  10. /* Define S_OK and ITF_* */
  11. #ifdef _WIN32
  12. #include <winerror.h>
  13. #endif
  14. /*
  15. * MAPI Status codes follow the style of OLE 2.0 sCodes as defined in the
  16. * OLE 2.0 Programmer's Reference and header file scode.h (Windows 3.x)
  17. * or winerror.h (Windows NT and Windows 95).
  18. *
  19. */
  20. /* On Windows 3.x, status codes have 32-bit values as follows:
  21. *
  22. * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  23. * 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
  24. * +-+---------------------+-------+-------------------------------+
  25. * |S| Context | Facil | Code |
  26. * +-+---------------------+-------+-------------------------------+
  27. *
  28. * where
  29. *
  30. * S - is the severity code
  31. *
  32. * 0 - SEVERITY_SUCCESS
  33. * 1 - SEVERITY_ERROR
  34. *
  35. * Context - context info
  36. *
  37. * Facility - is the facility code
  38. *
  39. * 0x0 - FACILITY_NULL generally useful errors ([SE]_*)
  40. * 0x1 - FACILITY_RPC remote procedure call errors (RPC_E_*)
  41. * 0x2 - FACILITY_DISPATCH late binding dispatch errors
  42. * 0x3 - FACILITY_STORAGE storage errors (STG_E_*)
  43. * 0x4 - FACILITY_ITF interface-specific errors
  44. *
  45. * Code - is the facility's status code
  46. *
  47. *
  48. */
  49. /*
  50. * On Windows NT 3.5 and Windows 95, scodes are 32-bit values
  51. * laid out as follows:
  52. *
  53. * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  54. * 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
  55. * +-+-+-+-+-+---------------------+-------------------------------+
  56. * |S|R|C|N|r| Facility | Code |
  57. * +-+-+-+-+-+---------------------+-------------------------------+
  58. *
  59. * where
  60. *
  61. * S - Severity - indicates success/fail
  62. *
  63. * 0 - Success
  64. * 1 - Fail (COERROR)
  65. *
  66. * R - reserved portion of the facility code, corresponds to NT's
  67. * second severity bit.
  68. *
  69. * C - reserved portion of the facility code, corresponds to NT's
  70. * C field.
  71. *
  72. * N - reserved portion of the facility code. Used to indicate a
  73. * mapped NT status value.
  74. *
  75. * r - reserved portion of the facility code. Reserved for internal
  76. * use. Used to indicate HRESULT values that are not status
  77. * values, but are instead message ids for display strings.
  78. *
  79. * Facility - is the facility code
  80. * FACILITY_NULL 0x0
  81. * FACILITY_RPC 0x1
  82. * FACILITY_DISPATCH 0x2
  83. * FACILITY_STORAGE 0x3
  84. * FACILITY_ITF 0x4
  85. * FACILITY_WIN32 0x7
  86. * FACILITY_WINDOWS 0x8
  87. *
  88. * Code - is the facility's status code
  89. *
  90. */
  91. /*
  92. * We can't use OLE 2.0 macros to build sCodes because the definition has
  93. * changed and we wish to conform to the new definition.
  94. */
  95. /* The following two macros are used to build OLE 2.0 style sCodes */
  96. #ifdef SUCCESS_SUCCESS
  97. #undef SUCCESS_SUCCESS
  98. #endif
  99. #define SUCCESS_SUCCESS 0L
  100. /* General errors (used by more than one MAPI object) */
  101. Sc(MAPI_E_NO_SUPPORT),
  102. Sc(MAPI_E_BAD_CHARWIDTH),
  103. Sc(MAPI_E_STRING_TOO_LONG),
  104. Sc(MAPI_E_UNKNOWN_FLAGS),
  105. Sc(MAPI_E_INVALID_ENTRYID),
  106. Sc(MAPI_E_INVALID_OBJECT),
  107. Sc(MAPI_E_OBJECT_CHANGED),
  108. Sc(MAPI_E_OBJECT_DELETED),
  109. Sc(MAPI_E_BUSY),
  110. Sc(MAPI_E_NOT_ENOUGH_DISK),
  111. Sc(MAPI_E_NOT_ENOUGH_RESOURCES),
  112. Sc(MAPI_E_NOT_FOUND),
  113. Sc(MAPI_E_VERSION),
  114. Sc(MAPI_E_LOGON_FAILED),
  115. Sc(MAPI_E_SESSION_LIMIT),
  116. Sc(MAPI_E_USER_CANCEL),
  117. Sc(MAPI_E_UNABLE_TO_ABORT),
  118. Sc(MAPI_E_NETWORK_ERROR),
  119. Sc(MAPI_E_DISK_ERROR),
  120. Sc(MAPI_E_TOO_COMPLEX),
  121. Sc(MAPI_E_BAD_COLUMN),
  122. Sc(MAPI_E_EXTENDED_ERROR),
  123. Sc(MAPI_E_COMPUTED),
  124. Sc(MAPI_E_CORRUPT_DATA),
  125. Sc(MAPI_E_UNCONFIGURED),
  126. Sc(MAPI_E_FAILONEPROVIDER),
  127. Sc(MAPI_E_UNKNOWN_CPID),
  128. Sc(MAPI_E_UNKNOWN_LCID),
  129. /* MAPI base function and status object specific errors and warnings */
  130. Sc(MAPI_E_END_OF_SESSION),
  131. Sc(MAPI_E_UNKNOWN_ENTRYID),
  132. Sc(MAPI_E_MISSING_REQUIRED_COLUMN),
  133. Sc(MAPI_W_NO_SERVICE),
  134. /* Property specific errors and warnings */
  135. Sc(MAPI_E_BAD_VALUE),
  136. Sc(MAPI_E_INVALID_TYPE),
  137. Sc(MAPI_E_TYPE_NO_SUPPORT),
  138. Sc(MAPI_E_UNEXPECTED_TYPE),
  139. Sc(MAPI_E_TOO_BIG),
  140. Sc(MAPI_E_DECLINE_COPY),
  141. Sc(MAPI_E_UNEXPECTED_ID),
  142. Sc(MAPI_W_ERRORS_RETURNED),
  143. /* Table specific errors and warnings */
  144. Sc(MAPI_E_UNABLE_TO_COMPLETE),
  145. Sc(MAPI_E_TIMEOUT),
  146. Sc(MAPI_E_TABLE_EMPTY),
  147. Sc(MAPI_E_TABLE_TOO_BIG),
  148. Sc(MAPI_E_INVALID_BOOKMARK),
  149. Sc(MAPI_W_POSITION_CHANGED),
  150. Sc(MAPI_W_APPROX_COUNT),
  151. /* Transport specific errors and warnings */
  152. Sc(MAPI_E_WAIT),
  153. Sc(MAPI_E_CANCEL),
  154. Sc(MAPI_E_NOT_ME),
  155. Sc(MAPI_W_CANCEL_MESSAGE),
  156. /* Message Store, Folder, and Message specific errors and warnings */
  157. Sc(MAPI_E_CORRUPT_STORE),
  158. Sc(MAPI_E_NOT_IN_QUEUE),
  159. Sc(MAPI_E_NO_SUPPRESS),
  160. Sc(MAPI_E_COLLISION),
  161. Sc(MAPI_E_NOT_INITIALIZED),
  162. Sc(MAPI_E_NON_STANDARD),
  163. Sc(MAPI_E_NO_RECIPIENTS),
  164. Sc(MAPI_E_SUBMITTED),
  165. Sc(MAPI_E_HAS_FOLDERS),
  166. Sc(MAPI_E_HAS_MESSAGES),
  167. Sc(MAPI_E_FOLDER_CYCLE),
  168. Sc(MAPI_W_PARTIAL_COMPLETION),
  169. /* Address Book specific errors and warnings */
  170. Sc(MAPI_E_AMBIGUOUS_RECIP),
  171. /* The range 0x0800 to 0x08FF is reserved */
  172. /* Obsolete typing shortcut that will go away eventually. */
  173. #ifndef MakeResult
  174. #endif
  175. /* We expect these to eventually be defined by OLE, but for now,
  176. * here they are. When OLE defines them they can be much more
  177. * efficient than these, but these are "proper" and don't make
  178. * use of any hidden tricks.
  179. */
  180. #ifndef HR_SUCCEEDED
  181. #endif
  182. #endif /* _SCODE_H */