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.

256 lines
16 KiB

  1. //=================================================================================
  2. // Thor Errors - HRESULTS that map to string resource Ids
  3. // =================================================================================
  4. #ifndef __ERROR_H
  5. #define __ERROR_H
  6. #ifndef S_TRUE
  7. #define S_TRUE S_OK
  8. #endif
  9. // =================================================================================
  10. // Makes an Error HRESULT
  11. // =================================================================================
  12. #define ATH_HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, n)
  13. // =================================================================================
  14. // Makes a Success HRESULT
  15. // =================================================================================
  16. #define ATH_HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, n)
  17. // =================================================================================
  18. // Computes the String Resource Id of the HRESULT
  19. // =================================================================================
  20. #define HR_CODE(hr) (INT)(hr & 0xffff)
  21. // =================================================================================
  22. // HRESULT_BASE - Increment off of this base number if not using a resource string
  23. // =================================================================================
  24. // moved from 100 to 1000 to avoid conflicts with mimeole (t-erikne)
  25. #define HR_FIRST 0x1000 // Put at the bottom
  26. // =================================================================================
  27. // HRESULTS - General
  28. // =================================================================================
  29. #define hrRasInitFailure ATH_HR_E(idshrRasInitFailure)
  30. #define hrRasDialFailure ATH_HR_E(idshrRasDialFailure)
  31. #define hrRasServerNotFound ATH_HR_E(idshrRasServerNotFound)
  32. #define hrGetDialParamsFailed ATH_HR_E(idshrGetDialParamsFailed)
  33. #define hrRasPasswordExpired ATH_HR_E(idshrRasPasswordExpired)
  34. #define hrSetDialParamsFailed ATH_HR_E(idshrSetDialParamsFailed)
  35. #define hrSicilyLogonFailed ATH_HR_E(idsErrSicilyLogonFailed)
  36. #define hrFailedToLoadSicily ATH_HR_E(idsErrSicilyFailedToLoad)
  37. // =================================================================================
  38. // Non-String based HRESULTS
  39. // =================================================================================
  40. #define hrMemory E_OUTOFMEMORY
  41. #define hrCharsetSyntax ATH_HR_E(HR_FIRST + 1)
  42. #define hrCreateFile ATH_HR_E(HR_FIRST + 2)
  43. #define hrLoadLibraryFailed ATH_HR_E(HR_FIRST + 3)
  44. #define hrGetProcAddressFailed ATH_HR_E(HR_FIRST + 4)
  45. #define hrCharSetDllGetDispatchTable ATH_HR_E(HR_FIRST + 5)
  46. #define hrFolderIsLocked ATH_HR_E(HR_FIRST + 6)
  47. #define hrInvalidMimeMessage ATH_HR_E(HR_FIRST + 7)
  48. #define hrCntListOutofSync ATH_HR_E(HR_FIRST + 8)
  49. #define hrWriteFileFailed ATH_HR_E(HR_FIRST + 9)
  50. #define hrUserCancel ATH_HR_E(HR_FIRST + 10)
  51. #define hrInvalidParameter ATH_HR_E(HR_FIRST + 11)
  52. #define hrBufferTooShort ATH_HR_E(HR_FIRST + 13)
  53. #define hrIncompleteHeader ATH_HR_E(HR_FIRST + 14)
  54. #define hrErrSplitMsg ATH_HR_E(HR_FIRST + 15)
  55. #define hrInvalidAccount ATH_HR_E(HR_FIRST + 16)
  56. #define hrInvalidPassword ATH_HR_E(HR_FIRST + 17)
  57. #define hrPOP3ErrorResponse ATH_HR_E(HR_FIRST + 18)
  58. #define hrSMTPRecipientsRejected ATH_HR_E(HR_FIRST + 19)
  59. #define hrWSAStartupFailed ATH_HR_E(HR_FIRST + 20)
  60. #define hrWSAVerNotSupported ATH_HR_E(HR_FIRST + 21)
  61. #define hrNoRecipients ATH_HR_E(HR_FIRST + 22)
  62. #define hrNoSender ATH_HR_E(HR_FIRST + 23)
  63. #define hrEmptySenderAddress ATH_HR_E(HR_FIRST + 24)
  64. #define hrEmptyRecipientAddress ATH_HR_E(HR_FIRST + 25)
  65. #define hrSMTPInvalidResponseCode ATH_HR_E(HR_FIRST + 26)
  66. #define hrXPNotOpen ATH_HR_E(HR_FIRST + 27)
  67. #define hrInvalidMsgIndex ATH_HR_E(HR_FIRST + 28)
  68. #define hrSetFilePointer ATH_HR_E(HR_FIRST + 29)
  69. #define hrReadFile ATH_HR_E(HR_FIRST + 30)
  70. #define hrWriteFile ATH_HR_E(HR_FIRST + 31)
  71. #define hrDuplicateUidl ATH_HR_E(HR_FIRST + 32)
  72. #define hrCantDeleteSpecialFolder ATH_HR_E(HR_FIRST + 33)
  73. #define hrCantRenameSpecialFolder ATH_HR_E(HR_FIRST + 34)
  74. #define hrFolderNameConflict ATH_HR_E(HR_FIRST + 35)
  75. #define hrFileNameConflict ATH_HR_E(HR_FIRST + 36)
  76. #define hrPasswordNotFound ATH_HR_E(HR_FIRST + 37)
  77. #define hrBusy ATH_HR_E(HR_FIRST + 38)
  78. #define hrUnresolvedNames ATH_HR_E(HR_FIRST + 39)
  79. #define hrUidlNotSupported ATH_HR_E(HR_FIRST + 40)
  80. #define hrNoServers ATH_HR_E(HR_FIRST + 41)
  81. // keep these in this order and contiguous
  82. #define hrCorruptMessage ATH_HR_E(HR_FIRST + 42)
  83. #define hrCorruptFolder ATH_HR_E(HR_FIRST + 43)
  84. #define hrFolderDeleted ATH_HR_E(HR_FIRST + 44)
  85. #define hrBlobVersionChanged ATH_HR_E(HR_FIRST + 45)
  86. #define hrFolderDeletedIndex ATH_HR_E(HR_FIRST + 46)
  87. // keep these in this order and contiguous
  88. #define hrGeneralProtocolError ATH_HR_E(HR_FIRST + 50)
  89. #define hrSMTP500SyntaxError ATH_HR_E(HR_FIRST + 51)
  90. #define hrSMTP501ParameterSyntax ATH_HR_E(HR_FIRST + 52)
  91. #define hrSMTP502CommandNotImpl ATH_HR_E(HR_FIRST + 53)
  92. #define hrSMTP503CommandSeq ATH_HR_E(HR_FIRST + 54)
  93. #define hrSMTP504CommandParamNotImpl ATH_HR_E(HR_FIRST + 55)
  94. #define hrSMTP421NotAvailable ATH_HR_E(HR_FIRST + 56)
  95. #define hrSMTP450MailboxBusy ATH_HR_E(HR_FIRST + 57)
  96. #define hrSMTP550MailboxNotFound ATH_HR_E(HR_FIRST + 58)
  97. #define hrSMTP451ErrorProcessing ATH_HR_E(HR_FIRST + 59)
  98. #define hrSMTP551UserNotLocal ATH_HR_E(HR_FIRST + 60)
  99. #define hrSMTP452NoSystemStorage ATH_HR_E(HR_FIRST + 61)
  100. #define hrSMTP552StorageOverflow ATH_HR_E(HR_FIRST + 62)
  101. #define hrSMTP553MailboxNameSyntax ATH_HR_E(HR_FIRST + 63)
  102. #define hrSMTP554TransactionFailed ATH_HR_E(HR_FIRST + 64)
  103. #define hrSMTPNotRecognized ATH_HR_E(HR_FIRST + 65)
  104. #define hrSMTP211SystemStatus ATH_HR_S(HR_FIRST + 66)
  105. #define hrSMTP214HelpMessage ATH_HR_S(HR_FIRST + 67)
  106. #define hrSMTP220Ready ATH_HR_S(HR_FIRST + 68)
  107. #define hrSMTP221Closing ATH_HR_S(HR_FIRST + 69)
  108. #define hrSMTP250MailActionOkay ATH_HR_S(HR_FIRST + 70)
  109. #define hrSMTP251ForwardingMail ATH_HR_S(HR_FIRST + 71)
  110. #define hrSMTP354StartMailInput ATH_HR_S(HR_FIRST + 72)
  111. #define hrNotConnected ATH_HR_E(HR_FIRST + 73)
  112. #define hrDroppedConn ATH_HR_E(HR_FIRST + 74)
  113. #define hrBtreeCorrupt ATH_HR_E(HR_FIRST + 75)
  114. #define hrDisableOption ATH_HR_E(HR_FIRST + 76)
  115. #define hrFolderIsInUseByOther ATH_HR_E(HR_FIRST + 77)
  116. #define hrUnableToLoadWab32Dll ATH_HR_E(HR_FIRST + 78)
  117. #define hrWabNotLoaded ATH_HR_E(HR_FIRST + 79)
  118. #define hrTreeInsertDuplicate ATH_HR_E(HR_FIRST + 80)
  119. #define hrBufferTooSmall ATH_HR_E(HR_FIRST + 81)
  120. #define hrBufferTooLarge ATH_HR_E(HR_FIRST + 82)
  121. #define hrGetPropsFailed ATH_HR_E(HR_FIRST + 83)
  122. #define hrSetPropsFailed ATH_HR_E(HR_FIRST + 84)
  123. #define hrNotFound ATH_HR_E(HR_FIRST + 85)
  124. #define hrFolderNameTooLong ATH_HR_E(HR_FIRST + 86)
  125. #define hrDiskFull ATH_HR_E(HR_FIRST + 87)
  126. #define hrAlreadyConnected ATH_HR_E(HR_FIRST + 88)
  127. #define hrInvalidState ATH_HR_E(HR_FIRST + 89)
  128. #define hrConn ATH_HR_E(HR_FIRST + 90)
  129. #define hrConnRecv ATH_HR_E(HR_FIRST + 91)
  130. #define hrConnSend ATH_HR_E(HR_FIRST + 92)
  131. #define hrTooManyReplyTo ATH_HR_E(HR_FIRST + 93)
  132. #define hrUnableToLoadMapi32Dll ATH_HR_E(HR_FIRST + 94)
  133. #define hrIncomplete ATH_HR_E(HR_FIRST + 95)
  134. #define hrAlreadyExists ATH_HR_E(HR_FIRST + 96)
  135. #define hrHostLookupFailed ATH_HR_E(HR_FIRST + 97)
  136. #define hrInvalidResponse ATH_HR_E(HR_FIRST + 98)
  137. #define hrConnectFailed ATH_HR_E(HR_FIRST + 99)
  138. #define hrWouldBlock ATH_HR_E(HR_FIRST + 100)
  139. #define hrImportLoad ATH_HR_E(HR_FIRST + 101)
  140. #define hrMailNotConfigured ATH_HR_E(HR_FIRST + 103)
  141. #define hrInvalidFolderName ATH_HR_E(HR_FIRST + 104)
  142. #define hrSwitchRasConnection ATH_HR_S(HR_FIRST + 105)
  143. #define hrInvalidCertCN ATH_HR_E(HR_FIRST + 106)
  144. #define hrInvalidCertDate ATH_HR_E(HR_FIRST + 107)
  145. //#define hrRegCreateKeyFailed ATH_HR_E(HR_FIRST + 108)
  146. #define hrRegQueryInfoKeyFailed ATH_HR_E(HR_FIRST + 109)
  147. //#define hrBadFriendlyName ATH_HR_E(HR_FIRST + 110)
  148. //#define hrInvalidPropTag ATH_HR_E(HR_FIRST + 111)
  149. //#define hrPropNoData ATH_HR_E(HR_FIRST + 112)
  150. //#define hrBufferSizeMismatch ATH_HR_E(HR_FIRST + 113)
  151. //#define hrEnumFinished ATH_HR_S(HR_FIRST + 114)
  152. //#define hrUnknownPropType ATH_HR_E(HR_FIRST + 115)
  153. //#define hrInvalidPropertySet ATH_HR_E(HR_FIRST + 116)
  154. //#define hrRegSetValueFailed ATH_HR_E(HR_FIRST + 117)
  155. #define hrRegOpenKeyFailed ATH_HR_E(HR_FIRST + 118)
  156. //#define hrDuplicateAccountName ATH_HR_E(HR_FIRST + 119)
  157. //#define hrPropOutOfRange ATH_HR_E(HR_FIRST + 120)
  158. //#define hrPropInvalidBool ATH_HR_E(HR_FIRST + 121)
  159. //#define hrNoAccounts ATH_HR_E(HR_FIRST + 122)
  160. //#define hrRegDeleteKeyFailed ATH_HR_E(HR_FIRST + 123)
  161. #define hrCantMoveFolderBetweenServers ATH_HR_E(HR_FIRST + 122)
  162. #define hrCantDeleteAllSubfolders ATH_HR_E(HR_FIRST + 123)
  163. #define hrCantDeleteFolderWithChildren ATH_HR_E(HR_FIRST + 124)
  164. #define hrCantMoveSpecialFolder ATH_HR_E(HR_FIRST + 125)
  165. #define hrCantMoveIntoSubfolder ATH_HR_E(HR_FIRST + 126)
  166. // Offline News Error Codes
  167. #define HR_E_NOTINITIALIZED ATH_HR_E(HR_FIRST + 127)
  168. #define HR_E_COULDNOTSTARTTHREAD ATH_HR_E(HR_FIRST + 128)
  169. #define HR_S_ACCOUNTNOTCONFIGURED ATH_HR_S(HR_FIRST + 129)
  170. #define HR_E_NOSUBSCRIBEDLIST ATH_HR_E(HR_FIRST + 130)
  171. #define HR_E_QUEUEEMPTY ATH_HR_E(HR_FIRST + 131)
  172. #define HR_E_COULDNOTFINDACCOUNT ATH_HR_E(HR_FIRST + 132)
  173. #define HR_E_COULDNOTINITSUBLIST ATH_HR_E(HR_FIRST + 133)
  174. #define HR_S_DOWNLOADCOMPLETE ATH_HR_S(HR_FIRST + 134)
  175. #define HR_E_DOWNLOADCOMPLETE ATH_HR_E(HR_FIRST + 135)
  176. #define hrNoSubject ATH_HR_E(HR_FIRST + 136)
  177. // Connection Manager Error Codes
  178. #define HR_E_ALREADYEXISTS ATH_HR_E(HR_FIRST + 137)
  179. #define HR_S_RASNOTLOADED ATH_HR_S(HR_FIRST + 138)
  180. #define HR_E_UNINITIALIZED ATH_HR_E(HR_FIRST + 139)
  181. #define HR_E_OFFLINE ATH_HR_E(HR_FIRST + 140)
  182. #define HR_E_USER_CANCEL_CONNECT ATH_HR_E(HR_FIRST + 141)
  183. // BEGIN another general section
  184. #define hrEmptyDistList ATH_HR_E(HR_FIRST + 149)
  185. #define hrBadRecipients ATH_HR_E(HR_FIRST + 150)
  186. #define HR_S_NOOP ATH_HR_S(HR_FIRST + 151)
  187. #define VIEW_E_NOCOLUMNS ATH_HR_E(HR_FIRST + 152)
  188. #define VIEW_E_BADVERSION ATH_HR_E(HR_FIRST + 153)
  189. #define HR_E_CONFIGURE_SERVER ATH_HR_E(HR_FIRST + 154)
  190. #define HR_E_POST_WITHOUT_NEWS ATH_HR_E(HR_FIRST + 155)
  191. // IMAP Error codes
  192. #define hrIMAP_E_NoHierarchy ATH_HR_E(HR_FIRST + 300)
  193. #define hrIMAP_E_OFFLINE ATH_HR_E(HR_FIRST + 301) // online op attempted while offline
  194. #define hrIMAP_E_NoInferiors ATH_HR_E(HR_FIRST + 302)
  195. // Security Error codes
  196. #define HR_E_ATHSEC_NOCERTTOSIGN ATH_HR_E(HR_FIRST + 400)
  197. #define HR_E_ATHSEC_TRUSTFAILED ATH_HR_E(HR_FIRST + 401)
  198. #define HR_E_ATHSEC_FAILED ATH_HR_E(HR_FIRST + 402)
  199. #define HR_E_ATHSEC_CERTBEGONE ATH_HR_E(HR_FIRST + 403)
  200. #define HR_E_ATHSEC_SAMEASSIGNED ATH_HR_E(HR_FIRST + 404)
  201. #define HR_E_ATHSEC_DONTSIGN ATH_HR_E(HR_FIRST + 405)
  202. #define HR_E_ATHSEC_USENEWSIGN ATH_HR_E(HR_FIRST + 406)
  203. // SafeOpen return codes
  204. #define S_OPENFILE ATH_HR_S(HR_FIRST + 410)
  205. #define S_SAVEFILE ATH_HR_S(HR_FIRST + 411)
  206. #define S_READONLY ATH_HR_S(HR_FIRST + 412)
  207. // Spell checking
  208. #define HR_S_ABORT ATH_HR_S(HR_FIRST + 420)
  209. #define HR_S_SPELLCANCEL ATH_HR_S(HR_FIRST + 421)
  210. #define HR_S_BADURLSNOTATTACHED ATH_HR_S(HR_FIRST + 422)
  211. #define HR_S_SPELLCONTINUE ATH_HR_S(HR_FIRST + 423)
  212. #define HR_S_SPELLBREAK ATH_HR_S(HR_FIRST + 424)
  213. // papyrus
  214. #define PAPYRUS_PRESENT ATH_HR_E(HR_FIRST + 450)
  215. // FolderCache error codes
  216. #define hrFolderDoesNotExist ATH_HR_E(HR_FIRST + 500)
  217. #define hrFolderHasNoChildren ATH_HR_E(HR_FIRST + 501)
  218. #define E_NOT_ONLINE ATH_HR_E(HR_FIRST + 502)
  219. #define S_PENDING ATH_HR_S(HR_FIRST + 503)
  220. #define E_NOMORETASKS ATH_HR_E(HR_FIRST + 504)
  221. #define HR_W_CACHEDELTED ATH_HR_S(HR_FIRST + 505) // warning that the cached messages were delted
  222. #define HR_S_OFFLINE ATH_HR_S(HR_FIRST + 506)
  223. //Offline folder operation errors
  224. #define HR_E_OFFLINE_FOLDER_CREATE ATH_HR_E(HR_FIRST + 507)
  225. #define HR_E_OFFLINE_FOLDER_MOVE ATH_HR_E(HR_FIRST + 508)
  226. #define HR_E_OFFLINE_FOLDER_RENAME ATH_HR_E(HR_FIRST + 509)
  227. #define HR_E_OFFLINE_FOLDER_DELETE ATH_HR_E(HR_FIRST + 510)
  228. #define HR_E_DIALING_INPROGRESS ATH_HR_E(HR_FIRST + 511)
  229. #endif //__ERROR_H