INFO: ERROR_BUS_RESET May Be Benign

Last reviewed: November 26, 1997
Article ID: Q111837
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with: - Microsoft Windows NT versions 3.1, 3.5, 3.51, 4.0

SUMMARY

Tape API (application programming interface) functions may return an error code of ERROR_BUS_RESET when operating on SCSI tape devices. In many cases, you can ignore this error value and retry the operation. However, this error is fatal if received during a series of write operations because a tape drive cannot recover from a bus reset and continue writing.

MORE INFORMATION

When Windows NT boots up it resets the SCSI bus. This bus reset is reported by the tape drive in response to the first operation after the reset.

The code fragment shown below in the Sample Code section could be used to check for ERROR_BUS_RESET and clear it. The same technique could be used for other informational errors, such as ERROR_MEDIA_CHANGED, that may not be relevant at application startup.

Sample Code

   /*
   ** This is a code fragment only and will not compile and run as is.
   */

      ...
      do {
         dwError = GetTapeStatus(hTape);
      } while (dwError == ERROR_BUS_RESET);
      ...
Keywords          : BseFileio kbcode kberrmsg
Version           : winnt:3.1,3.5,3.51,4.0;
Platform          : winnt
Issue type        : kbinfo


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 26, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.