home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / error.h < prev    next >
Text File  |  1998-04-25  |  14KB  |  346 lines

  1. /***
  2. *error.h - DOS error codes
  3. *
  4. *   Copyright (c) 1987-1992, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *   DOS calls all return error codes through AX.  If an error occurred then
  8. *   the carry bit will be set and the error code is in AX.  If no error occurred
  9. *   then the carry bit is reset and AX contains returned info.
  10. *
  11. *   Since the set of error codes is being extended as we extend the operating
  12. *   system, we have provided a means for applications to ask the system for a
  13. *   recommended course of action when they receive an error.
  14. *
  15. *   The GetExtendedError system call returns a universal error, an error
  16. *   location and a recommended course of action. The universal error code is
  17. *   a symptom of the error REGARDLESS of the context in which GetExtendedError
  18. *   is issued.
  19. *
  20. ****/
  21.  
  22. /*static char *SCCSID = "@(#)error.h  7.25 87/07/23";*/
  23. /* XENIX calls all return error codes through AX.  If an error occurred then */
  24. /* the carry bit will be set and the error code is in AX.  If no error occurred */
  25. /* then the carry bit is reset and AX contains returned info. */
  26. /* */
  27. /* Since the set of error codes is being extended as we extend the operating */
  28. /* system, we have provided a means for applications to ask the system for a */
  29. /* recommended course of action when they receive an error. */
  30. /* */
  31. /* The GetExtendedError system call returns a universal error, an error */
  32. /* location and a recommended course of action. The universal error code is */
  33. /* a symptom of the error REGARDLESS of the context in which GetExtendedError */
  34. /* is issued. */
  35. /* */
  36. /* */
  37. /* These are the 2.0 error codes */
  38. /* */
  39. #define NO_ERROR            0
  40. #define ERROR_INVALID_FUNCTION      1
  41. #define ERROR_FILE_NOT_FOUND        2
  42. #define ERROR_PATH_NOT_FOUND        3
  43. #define ERROR_TOO_MANY_OPEN_FILES   4
  44. #define ERROR_ACCESS_DENIED     5
  45. #define ERROR_INVALID_HANDLE        6
  46. #define ERROR_ARENA_TRASHED     7
  47. #define ERROR_NOT_ENOUGH_MEMORY     8
  48. #define ERROR_INVALID_BLOCK     9
  49. #define ERROR_BAD_ENVIRONMENT       10
  50. #define ERROR_BAD_FORMAT        11
  51. #define ERROR_INVALID_ACCESS        12
  52. #define ERROR_INVALID_DATA      13
  53. /* **** reserved            14  ; ***** */
  54. #define ERROR_INVALID_DRIVE     15
  55. #define ERROR_CURRENT_DIRECTORY     16
  56. #define ERROR_NOT_SAME_DEVICE       17
  57. #define ERROR_NO_MORE_FILES     18
  58. /* */
  59. /* These are the universal int 24 mappings for the old INT 24 set of errors */
  60. /* */
  61. #define ERROR_WRITE_PROTECT     19
  62. #define ERROR_BAD_UNIT          20
  63. #define ERROR_NOT_READY         21
  64. #define ERROR_BAD_COMMAND       22
  65. #define ERROR_CRC           23
  66. #define ERROR_BAD_LENGTH        24
  67. #define ERROR_SEEK          25
  68. #define ERROR_NOT_DOS_DISK      26
  69. #define ERROR_SECTOR_NOT_FOUND      27
  70. #define ERROR_OUT_OF_PAPER      28
  71. #define ERROR_WRITE_FAULT       29
  72. #define ERROR_READ_FAULT        30
  73. #define ERROR_GEN_FAILURE       31
  74. /* */
  75. /* These are the new 3.0 error codes reported through INT 24 */
  76. /* */
  77. #define ERROR_SHARING_VIOLATION     32
  78. #define ERROR_LOCK_VIOLATION        33
  79. #define ERROR_WRONG_DISK        34
  80. #define ERROR_FCB_UNAVAILABLE       35
  81. #define ERROR_SHARING_BUFFER_EXCEEDED   36
  82. /* */
  83. /* New OEM network-related errors are 50-79 */
  84. /* */
  85. #define ERROR_NOT_SUPPORTED     50
  86. /* */
  87. /* End of INT 24 reportable errors */
  88. /* */
  89. #define ERROR_FILE_EXISTS       80
  90. #define ERROR_DUP_FCB           81 /* ***** */
  91. #define ERROR_CANNOT_MAKE       82
  92. #define ERROR_FAIL_I24          83
  93. /* */
  94. /* New 3.0 network related error codes */
  95. /* */
  96. #define ERROR_OUT_OF_STRUCTURES     84
  97. #define ERROR_ALREADY_ASSIGNED      85
  98. #define ERROR_INVALID_PASSWORD      86
  99. #define ERROR_INVALID_PARAMETER     87
  100. #define ERROR_NET_WRITE_FAULT       88
  101. /* */
  102. /* New error codes for 4.0 */
  103. /* */
  104. #define ERROR_NO_PROC_SLOTS     89  /* no process slots available */
  105. #define ERROR_NOT_FROZEN        90
  106. #define ERR_TSTOVFL         91  /* timer service table overflow */
  107. #define ERR_TSTDUP          92  /* timer service table duplicate */
  108. #define ERROR_NO_ITEMS          93  /* There were no items to operate upon */
  109. #define ERROR_INTERRUPT         95  /* interrupted system call */
  110.  
  111. #define ERROR_TOO_MANY_SEMAPHORES   100
  112. #define ERROR_EXCL_SEM_ALREADY_OWNED    101
  113. #define ERROR_SEM_IS_SET        102
  114. #define ERROR_TOO_MANY_SEM_REQUESTS 103
  115. #define ERROR_INVALID_AT_INTERRUPT_TIME 104
  116.  
  117. #define ERROR_SEM_OWNER_DIED        105 /* waitsem found owner died */
  118. #define ERROR_SEM_USER_LIMIT        106 /* too many procs have this sem */
  119. #define ERROR_DISK_CHANGE       107 /* insert disk b into drive a */
  120. #define ERROR_DRIVE_LOCKED      108 /* drive locked by another process */
  121. #define ERROR_BROKEN_PIPE       109 /* write on pipe with no reader */
  122. /* */
  123. /* New error codes for OS/2 */
  124. /* */
  125. #define ERROR_OPEN_FAILED       110 /* open/created failed due to */
  126.                         /* explicit fail command */
  127. #define ERROR_BUFFER_OVERFLOW       111 /* buffer passed to system call */
  128.                         /* is too small to hold return */
  129.                         /* data. */
  130. #define ERROR_DISK_FULL         112 /* not enough space on the disk */
  131.                         /* (DOSNEWSIZE/w_NewSize) */
  132. #define ERROR_NO_MORE_SEARCH_HANDLES    113 /* can't allocate another search */
  133.                         /* structure and handle. */
  134.                         /* (DOSFINDFIRST/w_FindFirst) */
  135. #define ERROR_INVALID_TARGET_HANDLE 114 /* Target handle in DOSDUPHANDLE */
  136.                         /* is invalid */
  137. #define ERROR_PROTECTION_VIOLATION  115 /* Bad user virtual address */
  138. #define ERROR_VIOKBD_REQUEST        116
  139. #define ERROR_INVALID_CATEGORY      117 /* Category for DEVIOCTL in not */
  140.                         /* defined */
  141. #define ERROR_INVALID_VERIFY_SWITCH 118 /* invalid value passed for */
  142.                         /* verify flag */
  143. #define ERROR_BAD_DRIVER_LEVEL      119 /* DosDevIOCTL looks for a level */
  144.                         /* four driver.   If the driver */
  145.                         /* is not level four we return */
  146.                         /* this code */
  147. #define ERROR_CALL_NOT_IMPLEMENTED  120 /* returned from stub api calls. */
  148.                         /* This call will disappear when */
  149.                         /* all the api's are implemented. */
  150. #define ERROR_SEM_TIMEOUT       121 /* Time out happened from the */
  151.                         /* semaphore api functions. */
  152. #define ERROR_INSUFFICIENT_BUFFER   122 /* Some call require the  */
  153.                         /* application to pass in a buffer */
  154.                         /* filled with data.  This error is */
  155.                         /* returned if the data buffer is too */
  156.                         /* small.  For example: DosSetFileInfo */
  157.                         /* requires 4 bytes of data.  If a */
  158.                         /* two byte buffer is passed in then */
  159.                         /* this error is returned.   */
  160.                         /* error_buffer_overflow is used when */
  161.                         /* the output buffer in not big enough. */
  162. #define ERROR_INVALID_NAME      123 /* illegal character or malformed */
  163.                         /* file system name */
  164. #define ERROR_INVALID_LEVEL     124 /* unimplemented level for info */
  165.                         /* retrieval or setting */
  166. #define ERROR_NO_VOLUME_LABEL       125 /* no volume label found with */
  167.                         /* DosQFSInfo command */
  168. #define ERROR_MOD_NOT_FOUND     126 /* w_getprocaddr,w_getmodhandle */
  169. #define ERROR_PROC_NOT_FOUND        127 /* w_getprocaddr */
  170.  
  171. #define ERROR_WAIT_NO_CHILDREN      128 /* CWait finds to children */
  172.  
  173. #define ERROR_CHILD_NOT_COMPLETE    129 /* CWait children not dead yet */
  174.  
  175. /*This is a temporary fix for the 4-19-86 build this should be changed when */
  176. /* we get the file from MS */
  177. #define ERROR_DIRECT_ACCESS_HANDLE  130 /* handle operation is invalid */
  178.                         /* for direct disk access */
  179.                         /* handles */
  180. #define ERROR_NEGATIVE_SEEK     131 /* application tried to seek  */
  181.                         /* with negative offset */
  182. #define ERROR_SEEK_ON_DEVICE        132 /* application tried to seek */
  183.                         /* on device or pipe */
  184. /* */
  185. /* The following are errors generated by the join and subst workers */
  186. /* */
  187. #define ERROR_IS_JOIN_TARGET        133
  188. #define ERROR_IS_JOINED         134
  189. #define ERROR_IS_SUBSTED        135
  190. #define ERROR_NOT_JOINED        136
  191. #define ERROR_NOT_SUBSTED       137
  192. #define ERROR_JOIN_TO_JOIN      138
  193. #define ERROR_SUBST_TO_SUBST        139
  194. #define ERROR_JOIN_TO_SUBST     140
  195. #define ERROR_SUBST_TO_JOIN     141
  196. #define ERROR_BUSY_DRIVE        142
  197. #define ERROR_SAME_DRIVE        143
  198. #define ERROR_DIR_NOT_ROOT      144
  199. #define ERROR_DIR_NOT_EMPTY     145
  200. #define ERROR_IS_SUBST_PATH     146
  201. #define ERROR_IS_JOIN_PATH      147
  202. #define ERROR_PATH_BUSY         148
  203. #define ERROR_IS_SUBST_TARGET       149
  204. #define ERROR_SYSTEM_TRACE      150 /* system trace error */
  205. #define ERROR_INVALID_EVENT_COUNT   151 /* DosMuxSemWait errors */
  206. #define ERROR_TOO_MANY_MUXWAITERS   152
  207. #define ERROR_INVALID_LIST_FORMAT   153
  208. #define ERROR_LABEL_TOO_LONG        154
  209. #define ERROR_TOO_MANY_TCBS     155
  210. #define ERROR_SIGNAL_REFUSED        156
  211. #define ERROR_DISCARDED         157
  212. #define ERROR_NOT_LOCKED        158
  213. #define ERROR_BAD_THREADID_ADDR     159
  214. #define ERROR_BAD_ARGUMENTS     160
  215. #define ERROR_BAD_PATHNAME      161
  216. #define ERROR_SIGNAL_PENDING        162
  217. #define ERROR_UNCERTAIN_MEDIA       163
  218. #define ERROR_MAX_THRDS_REACHED     164
  219. #define ERROR_MONITORS_NOT_SUPPORTED    165
  220.  
  221. #define ERROR_INVALID_SEGMENT_NUMBER    180
  222. #define ERROR_INVALID_CALLGATE      181
  223. #define ERROR_INVALID_ORDINAL       182
  224. #define ERROR_ALREADY_EXISTS        183
  225. #define ERROR_NO_CHILD_PROCESS      184
  226. #define ERROR_CHILD_ALIVE_NOWAIT    185
  227. #define ERROR_INVALID_FLAG_NUMBER   186
  228. #define ERROR_SEM_NOT_FOUND     187
  229.  
  230. /*  following error codes have added to make the loader error
  231.     messages distinct
  232. */
  233.  
  234. #define ERROR_INVALID_STARTING_CODESEG  188
  235. #define ERROR_INVALID_STACKSEG      189
  236. #define ERROR_INVALID_MODULETYPE    190
  237. #define ERROR_INVALID_EXE_SIGNATURE 191
  238. #define ERROR_EXE_MARKED_INVALID    192
  239. #define ERROR_BAD_EXE_FORMAT        193
  240. #define ERROR_ITERATED_DATA_EXCEEDS_64k 194
  241. #define ERROR_INVALID_MINALLOCSIZE  195
  242. #define ERROR_DYNLINK_FROM_INVALID_RING 196
  243. #define ERROR_IOPL_NOT_ENABLED      197
  244. #define ERROR_INVALID_SEGDPL        198
  245. #define ERROR_AUTODATASEG_EXCEEDS_64k   199
  246. #define ERROR_RING2SEG_MUST_BE_MOVABLE  200
  247. #define ERROR_RELOC_CHAIN_XEEDS_SEGLIM  201
  248. #define ERROR_INFLOOP_IN_RELOC_CHAIN    202
  249.  
  250. #define ERROR_ENVVAR_NOT_FOUND      203
  251. #define ERROR_NOT_CURRENT_CTRY      204
  252. #define ERROR_NO_SIGNAL_SENT        205
  253. #define ERROR_FILENAME_EXCED_RANGE  206 /* if filename > 8.3 */
  254. #define ERROR_RING2_STACK_IN_USE    207 /* for FAPI */
  255. #define ERROR_META_EXPANSION_TOO_LONG   208 /* if "*a" > 8.3 */
  256.  
  257. #define ERROR_INVALID_SIGNAL_NUMBER 209
  258. #define ERROR_THREAD_1_INACTIVE     210
  259. #define ERROR_INFO_NOT_AVAIL        211 /*@@ PTM 5550 */
  260. #define ERROR_LOCKED            212
  261. #define ERROR_BAD_DYNALINK      213 /*@@ PTM 5760 */
  262. #define ERROR_TOO_MANY_MODULES      214
  263. #define ERROR_NESTING_NOT_ALLOWED   215
  264.  
  265. /*
  266.  * Error codes 230 - 249 are reserved for MS Networks
  267.  */
  268.  
  269. #define ERROR_USER_DEFINED_BASE     0xF000
  270.  
  271. #define ERROR_I24_WRITE_PROTECT     0
  272. #define ERROR_I24_BAD_UNIT      1
  273. #define ERROR_I24_NOT_READY     2
  274. #define ERROR_I24_BAD_COMMAND       3
  275. #define ERROR_I24_CRC           4
  276. #define ERROR_I24_BAD_LENGTH        5
  277. #define ERROR_I24_SEEK          6
  278. #define ERROR_I24_NOT_DOS_DISK      7
  279. #define ERROR_I24_SECTOR_NOT_FOUND  8
  280. #define ERROR_I24_OUT_OF_PAPER      9
  281. #define ERROR_I24_WRITE_FAULT       0x0A
  282. #define ERROR_I24_READ_FAULT        0x0B
  283. #define ERROR_I24_GEN_FAILURE       0x0C
  284. #define ERROR_I24_DISK_CHANGE       0x0D
  285. #define ERROR_I24_WRONG_DISK        0x0F
  286. #define ERROR_I24_UNCERTAIN_MEDIA   0x10
  287. #define ERROR_I24_CHAR_CALL_INTERRUPTED 0x11
  288. #define ERROR_I24_NO_MONITOR_SUPPORT    0x12
  289. #define ERROR_I24_INVALID_PARAMETER 0x13
  290.  
  291. #define ALLOWED_FAIL        0x0001
  292. #define ALLOWED_ABORT       0x0002
  293. #define ALLOWED_RETRY       0x0004
  294. #define ALLOWED_IGNORE      0x0008
  295.  
  296. #define I24_OPERATION       0x1
  297. #define I24_AREA        0x6
  298.                     /* 01 if FAT */
  299.                     /* 10 if root DIR */
  300.                     /* 11 if DATA */
  301. #define I24_CLASS       0x80
  302.  
  303.  
  304. /* Values for error CLASS */
  305.  
  306. #define ERRCLASS_OUTRES     1   /* Out of Resource */
  307. #define ERRCLASS_TEMPSIT    2   /* Temporary Situation */
  308. #define ERRCLASS_AUTH       3   /* Permission problem */
  309. #define ERRCLASS_INTRN      4   /* Internal System Error */
  310. #define ERRCLASS_HRDFAIL    5   /* Hardware Failure */
  311. #define ERRCLASS_SYSFAIL    6   /* System Failure */
  312. #define ERRCLASS_APPERR     7   /* Application Error */
  313. #define ERRCLASS_NOTFND     8   /* Not Found */
  314. #define ERRCLASS_BADFMT     9   /* Bad Format */
  315. #define ERRCLASS_LOCKED     10  /* Locked */
  316. #define ERRCLASS_MEDIA      11  /* Media Failure */
  317. #define ERRCLASS_ALREADY    12  /* Collision with Existing Item */
  318. #define ERRCLASS_UNK        13  /* Unknown/other */
  319. #define ERRCLASS_CANT       14
  320. #define ERRCLASS_TIME       15
  321.  
  322. /* Values for error ACTION */
  323.  
  324. #define ERRACT_RETRY        1   /* Retry */
  325. #define ERRACT_DLYRET       2   /* Delay Retry, retry after pause */
  326. #define ERRACT_USER     3   /* Ask user to regive info */
  327. #define ERRACT_ABORT        4   /* abort with clean up */
  328. #define ERRACT_PANIC        5   /* abort immediately */
  329. #define ERRACT_IGNORE       6   /* ignore */
  330. #define ERRACT_INTRET       7   /* Retry after User Intervention */
  331.  
  332. /* Values for error LOCUS */
  333.  
  334. #define ERRLOC_UNK      1   /* No appropriate value */
  335. #define ERRLOC_DISK     2   /* Random Access Mass Storage */
  336. #define ERRLOC_NET      3   /* Network */
  337. #define ERRLOC_SERDEV       4   /* Serial Device */
  338. #define ERRLOC_MEM      5   /* Memory */
  339.  
  340. /* Abnormal termination codes */
  341.  
  342. #define TC_NORMAL   0
  343. #define TC_HARDERR  1
  344. #define TC_GP_TRAP  2
  345. #define TC_SIGNAL   3
  346.