Extended Error Code Information

Article translations Article translations
Article ID: 74463 - View products that this article applies to.
This article was previously published under Q74463
Expand all | Collapse all

On This Page

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)
				

Properties

Article ID: 74463 - Last Review: May 12, 2003 - Revision: 2.0
APPLIES TO
  • Microsoft MS-DOS 3.1
  • Microsoft MS-DOS 3.2 Standard Edition
  • Microsoft MS-DOS 3.21 Standard Edition
  • Microsoft MS-DOS 3.3 Standard Edition
  • Microsoft MS-DOS 3.3a
  • Microsoft MS-DOS 4.0 Standard Edition
  • Microsoft MS-DOS 4.01 Standard Edition
  • Microsoft MS-DOS 5.0 Standard Edition
  • Microsoft MS-DOS 5.0a
  • Microsoft MS-DOS 6.0 Standard Edition
  • Microsoft MS-DOS 6.2 Standard Edition
  • Microsoft MS-DOS 6.21 Standard Edition
  • Microsoft MS-DOS 6.22 Standard Edition
Keywords: 
KB74463
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com