Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_hardretn() return to application after hardware error</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _hardretn()             Return to Application After Hardware Error

 #include   <dos.h>

  void _hardretn(error);
  int error;        Error to return from

    _hardretn() allows a user-defined hardware error handler to return
    directly to the application program rather than returning to MS-DOS.
    The application resumes control just after the the failing I/O
    function request. The function should only be called from within a
    user-defined hardware error handler function.

    'error' should be one of the following MS-DOS error codes (and not a
    XENIX-style error code from errno):

     Code  Meaning                           Code  Meaning
      00h  No error                           22h  Invalid disk change
      01h  Invalid function number            23h  FCB unavailable
      02h  File not found                     24h  Sharing buffer
                                                   overflow
      03h  Path not found                     32h  Network request not
                                                   supported
      04h  No handle available                33h  Remote computer not
                                                   listening
      05h  Access denied                      34h  Duplicate name on
                                                   network
      06h  Invalid handle                     35h  Network name not found
      07h  Memory control blocks destroyed    36h  Network busy
      08h  Insufficient memory                37h  Network device no
                                                   longer exists
      09h  Invalid memory block address       38h  Net BIOS command limit
                                                   exceeded
      0Ah  Invalid environment                39h  Network adapter
                                                   hardware error
      0Bh  Invalid format                     3Ah  Incorrect response
                                                   from network
      0Ch  Invalid access code                3Bh  Unexpected network
                                                   error
      0Dh  Invalid data                       3Ch  Incompatible remote
                                                   adapter
      0Eh  Reserved                           3Dh  Print queue full
      0Fh  Invalid drive specification        3Eh  Not enough space for
                                                   print file
      10h  Attempt to remove the current      3Fh  Print file was deleted
           directory                          40h  Network name was
                                                   deleted
      11h  Not same device                    41h  Access denied
      12h  No more files                      42h  Network device type
                                                   incorrect
      13h  Disk write-protected               43h  Network name not found
      14h  Unknown unit                       44h  Network name limit
                                                   exceeded
      15h  Drive not ready                    45h  Net BIOS session limit
                                                   exceeded
      16h  Unknown command                    46h  Temporarily paused
      17h  Disk data error (CRC)              47h  Network request not
                                                   accepted
      18h  Bad request structure length       48h  Print or disk
                                                   redirection paused
      19h  Seek error                         50h  File exists
      1Ah  Unknown media type                 51h  Reserved
      1Bh  Sector not found                   52h  Cannot make directory
                                                   entry
      1Ch  Printer out of paper               53h  Critical-error
                                                   interrupt failure
      1Dh  Write fault                        54h  Too many redirections
      1Eh  Read fault                         55h  Duplicate redirection
      1Fh  General failure                    56h  Invalid password
      20h  File sharing violation             57h  Invalid parameter
      21h  File locking violation             58h  Network data fault

      Notes:    If the failing I/O function request is an INT 21h
                function greater than 37h, then _hardretn() will return
                to the application with the carry flag set and the AX
                register set to the _hardretn() error parameter. This
                means the the application program can call dosexterr() to
                get extended error information upon recovery.

                If the failing I/O function request is an INT 21h
                function less than 38h, then _hardretn() will return to
                the application with the AL register set to FFh.

                If the failing INT 21h function is one of a few below 38h
                that cannot return an error condition, then the error
                parameter of _hardretn() is not used and no error code is
                returned to the application.

   Portability:     MS-DOS only, version 1.0 or higher


See Also: _harderr() _hardresume()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson