home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / dos / compat / d_exterr.txh < prev    next >
Encoding:
Text File  |  1995-10-09  |  5.1 KB  |  182 lines

  1. @node dosexterr, dos
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <dos.h>
  6.  
  7. int dosexterr(struct DOSERROR *p_error);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function reads extended error information from DOS and fills
  13. @var{p_error} structure.
  14.  
  15. @example
  16. struct _DOSERROR @{
  17.   int  exterror;
  18.   char class;
  19.   char action;
  20.   char locus;
  21. @};
  22. @end example
  23.  
  24. Values for extended error code (@var{exterror} field):
  25. @example
  26. 00h (0)   no error
  27. 01h (1)   function number invalid
  28. 02h (2)   file not found
  29. 03h (3)   path not found
  30. 04h (4)   too many open files (no handles available)
  31. 05h (5)   access denied
  32. 06h (6)   invalid handle
  33. 07h (7)   memory control block destroyed
  34. 08h (8)   insufficient memory
  35. 09h (9)   memory block address invalid
  36. 0Ah (10)  environment invalid (usually >32K in length)
  37. 0Bh (11)  format invalid
  38. 0Ch (12)  access code invalid
  39. 0Dh (13)  data invalid
  40. 0Eh (14)  reserved
  41. 0Fh (15)  invalid drive
  42. 10h (16)  attempted to remove current directory
  43. 11h (17)  not same device
  44. 12h (18)  no more files
  45. 13h (19)  disk write-protected
  46. 14h (20)  unknown unit
  47. 15h (21)  drive not ready
  48. 16h (22)  unknown command
  49. 17h (23)  data error (CRC)
  50. 18h (24)  bad request structure length
  51. 19h (25)  seek error
  52. 1Ah (26)  unknown media type (non-DOS disk)
  53. 1Bh (27)  sector not found
  54. 1Ch (28)  printer out of paper
  55. 1Dh (29)  write fault
  56. 1Eh (30)  read fault
  57. 1Fh (31)  general failure
  58. 20h (32)  sharing violation
  59. 21h (33)  lock violation
  60. 22h (34)  disk change invalid (ES:DI -> media ID structure)(see below)
  61. 23h (35)  FCB unavailable
  62. 24h (36)  sharing buffer overflow
  63. 25h (37)  (DOS 4+) code page mismatch
  64. 26h (38)  (DOS 4+) cannot complete file operation (out of input)
  65. 27h (39)  (DOS 4+) insufficient disk space
  66. 28h-31h   reserved
  67. 32h (50)  network request not supported
  68. 33h (51)  remote computer not listening
  69. 34h (52)  duplicate name on network
  70. 35h (53)  network name not found
  71. 36h (54)  network busy
  72. 37h (55)  network device no longer exists
  73. 38h (56)  network BIOS command limit exceeded
  74. 39h (57)  network adapter hardware error
  75. 3Ah (58)  incorrect response from network
  76. 3Bh (59)  unexpected network error
  77. 3Ch (60)  incompatible remote adapter
  78. 3Dh (61)  print queue full
  79. 3Eh (62)  queue not full
  80. 3Fh (63)  not enough space to print file
  81. 40h (64)  network name was deleted
  82. 41h (65)  network: Access denied
  83. 42h (66)  network device type incorrect
  84. 43h (67)  network name not found
  85. 44h (68)  network name limit exceeded
  86. 45h (69)  network BIOS session limit exceeded
  87. 46h (70)  temporarily paused
  88. 47h (71)  network request not accepted
  89. 48h (72)  network print/disk redirection paused
  90. 49h (73)  network software not installed
  91.           (LANtastic) invalid network version
  92. 4Ah (74)  unexpected adapter close
  93.           (LANtastic) account expired
  94. 4Bh (75)  (LANtastic) password expired
  95. 4Ch (76)  (LANtastic) login attempt invalid at this time
  96. 4Dh (77)  (LANtastic v3+) disk limit exceeded on network node
  97. 4Eh (78)  (LANtastic v3+) not logged in to network node
  98. 4Fh (79)  reserved
  99. 50h (80)  file exists
  100. 51h (81)  reserved
  101. 52h (82)  cannot make directory
  102. 53h (83)  fail on INT 24h
  103. 54h (84)  (DOS 3.3+) too many redirections
  104. 55h (85)  (DOS 3.3+) duplicate redirection
  105. 56h (86)  (DOS 3.3+) invalid password
  106. 57h (87)  (DOS 3.3+) invalid parameter
  107. 58h (88)  (DOS 3.3+) network write fault
  108. 59h (89)  (DOS 4+) function not supported on network
  109. 5Ah (90)  (DOS 4+) required system component not installed
  110. 64h (100) (MSCDEX) unknown error
  111. 65h (101) (MSCDEX) not ready
  112. 66h (102) (MSCDEX) EMS memory no longer valid
  113. 67h (103) (MSCDEX) not High Sierra or ISO-9660 format
  114. 68h (104) (MSCDEX) door open
  115. @end example
  116.  
  117. Values for error class (@var{class} field):
  118. @example
  119. 01h  out of resource (storage space or I/O channels)
  120. 02h  temporary situation (file or record lock)
  121. 03h  authorization (denied access)
  122. 04h  internal (system software bug)
  123. 05h  hardware failure
  124. 06h  system failure (configuration file missing or incorrect)
  125. 07h  application program error
  126. 08h  not found
  127. 09h  bad format
  128. 0Ah  locked
  129. 0Bh  media error
  130. 0Ch  already exists
  131. 0Dh  unknown
  132. @end example
  133.  
  134. Values for suggested action (@var{action} field):
  135. @example
  136. 01h  retry
  137. 02h  delayed retry
  138. 03h  prompt user to reenter input
  139. 04h  abort after cleanup
  140. 05h  immediate abort
  141. 06h  ignore
  142. 07h  retry after user intervention
  143. @end example
  144.  
  145. Values for error locus (@var{locus} field):
  146. @example
  147. 01h  unknown or not appropriate
  148. 02h  block device (disk error)
  149. 03h  network related
  150. 04h  serial device (timeout)
  151. 05h  memory related
  152. @end example
  153.  
  154. @subheading Return Value
  155.  
  156. Returns with the extended error code.
  157.  
  158. @subheading Example
  159.  
  160. @example
  161. #include <stdio.h>
  162. #include <dos.h>
  163.  
  164. void main(void)
  165. @{
  166.   FILE *fp;
  167.   struct _DOSERROR de;
  168.  
  169.   fp = fopen("EXAMPLE.DAT","r");
  170.   if ( fp == NULL )
  171.   @{
  172.     puts("Unable to open file for reading.");
  173.     _dosexterr(&de);
  174.     printf("Extended DOS error information:\n");
  175.     printf("Extended error: %i\n",de.exterror);
  176.     printf("Class:          %x\n",de.class);
  177.     printf("Action:         %x\n",de.action);
  178.     printf("Error Locus:    %x\n",de.locus);
  179.   @}
  180. @}
  181. @end example
  182.