home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / os2 / gtak212b.zip / SOURCE.ZIP / OS2-ST01 / error.inc < prev    next >
Text File  |  1989-06-06  |  16KB  |  333 lines

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