Extended Error Code Information (74463)



The information in this article applies to:
    Microsoft MS-DOS operating system 3.1
    Microsoft MS-DOS operating system 3.2
    Microsoft MS-DOS operating system 3.21
    Microsoft MS-DOS operating system 3.3
    Microsoft MS-DOS operating system 3.3a
    Microsoft MS-DOS operating system 4.0
    Microsoft MS-DOS operating system 4.01
    Microsoft MS-DOS operating system 5.0
    Microsoft MS-DOS operating system 5.0a
    Microsoft MS-DOS operating system 6.0
    Microsoft MS-DOS operating system 6.2
    Microsoft MS-DOS operating system 6.21
    Microsoft MS-DOS operating system 6.22

This article was previously published under Q74463

SUMMARY

The following MS-DOS function provides detailed extended error information concerning a failed Interrupt 21H function call:
   Interrupt 21H Function 59H - Get Extended Error Information
This routine returns codes named as the DOS extended error code, error class, recommended action, and error locus.
    The extended error code identifies exactly what occurred.
    The error class provides more information identifying the error based on the internal workings of the operating system.
    The recommended action codes are suggestions meant to help but are not solutions.
    The error locus codes attempt to provide information about the origin of the error or what device caused the error.

MORE INFORMATION

The MS-DOS function returns the four codes in the following registers:
   AX  Extended error code
   BH  Error class
   BL  Recommended action
   CH  Error locus

Extended Error Codes

   Hex    Decimal  Meaning
   ---    -------  -------
   01     01       Function number invalid
   02     02       File not found
   03     03       Path not found
   04     04       Too many open files
   05     05       Access denied
   06     06       Handle invalid
   07     07       Memory control blocks destroyed
   08     08       Insufficient memory
   09     09       Memory block address invalid
   0A     10       Environment invalid
   0B     11       Format invalid
   0C     12       Access code invalid
   0D     13       Data invalid
   0E     14       Unknown unit
   0F     15       Disk drive invalid
   10     16       Attempted to remove current directory
   11     17       Not same device
   12     18       No more files
   13     19       Write-protected disk
   14     20       Unknown unit
   15     21       Drive not ready
   16     22       Unknown command
   17     23       Data error (CRC)
   18     24       Bad request-structure length
   19     25       Seek error
   1A     26       Unknown media type
   1B     27       Sector not found
   1C     28       Printer out of paper
   1D     29       Write fault
   1E     30       Read fault
   1F     31       General failure
   20     32       Sharing violation
   21     33       File-lock violation
   22     34       Disk change invalid
   23     35       FCB unavailable
   24     36       Sharing buffer exceeded
   25-31  37-49    Reserved
   32     50       Unsupported network request
   33     51       Remote machine not listening
   34     52       Duplicate name on network
   35     53       Network name not found
   36     54       Network busy
   37     55       Device no longer exists on network
   38     56       NetBIOS command limit exceeded
   39     57       Error in network adapter hardware
   3A     58       Incorrect response from network
   3B     59       Unexpected network error
   3C     60       Remote adapter incompatible
   3D     61       Printer queue full
   3E     62       Not enough room for print file
   3F     63       Print file was deleted
   40     64       Network name deleted
   41     65       Network access denied
   42     66       Incorrect network device type
   43     67       Network name not found
   44     68       Network name limit exceeded
   45     69       NetBIOS session limit exceeded
   46     70       Temporary pause
   47     71       Network request not accepted
   48     72       Print or disk redirection paused
   49-4F  73-79    Reserved
   50     80       File already exists
   51     81       Reserved
   52     82       Cannot make directory
   53     83       Fail on Int 24H (critical error handler)
   54     84       Too many redirections
   55     85       Duplicate redirection
   56     86       Invalid password
   57     87       Invalid parameter
   58     88       Net write fault

Error Class Codes

   Class   Meaning
   -----   -------
    1      Out of resource
    2      Temporary situation
    3      Authorization
    4      Internal
    5      Hardware failure
    6      System failure
    7      Application program error
    8      Not found
    9      Bad format
   10      Locked
   11      Media
   12      Already exist
   13      Unknown

Recommended Action Codes

   1  Retry. If not cleared in reasonable number of attempts, prompt
      user to Abort or Ignore.
   2  Delay then retry. If not cleared in reasonable number of
      attempts, prompt user to Abort or Ignore.
   3  Get corrected information from user (bad filename or disk
      drive).
   4  Abort application with cleanup.
   5  Abort application without cleanup (cleanup may increase
      problems).
   6  Ignore error.
   7  Prompt user to correct error and then retry.

Error Locus Codes

   1  Unknown
   2  Block device (disk or disk emulator)
   3  Network
   4  Serial device
   5  Memory related
An application program may use the MS-DOS Interrupt 21H Function 59H call when a function call fails during the execution of the application. The program may take a number of possible different actions as a result, which could include retrying the function, aborting, or just displaying the DOS extended error code. For example, an application might display the following after a failed interrupt call:

DOS extended error 27 /11 /4 /2
This represents:
   Extended error 27       Sector not found
   Error class 11          Media
   Recommended action 4    Abort application with cleanup
   Error locus 2           Block device (disk or disk emulator)

Modification Type: Major Last Reviewed: 5/12/2003
Keywords: KB74463