HOWTO: Detecting CD-ROM Eject Without Bluescreen

Last reviewed: February 11, 1997
Article ID: Q163361
The information in this article applies to:
  • Microsoft Win32 Device Development Kit (DDK) for Windows 95, version 4.0

SUMMARY

When you eject a CD-ROM disc, and an application subsequently attempts to access the disc, Windows '95 switches to a critical error blue screen (in text mode) and asks the user to put the CD-ROM back in the drive. This article demonstrates how a vendor can prevent the blue screen, and instead put up a friendlier message or ignore the error all together.

MORE INFORMATION

To avoid the blue screen and have the error failed back to the calling application, you must use a VSD at ring 0 to intercept I/O Requests as they go down. The VSD must set the IORF_QUIET_VOLTRACK bit in the I/O Request, which tells VolTrack to simply return an error when the wrong media (or not media) is in the drive instead of putting up a dialog box.

REFERENCES

Microsoft Windows '95 DDK - "IOR" documentation


KBCategory: kbprg kbhowto
KBSubcategory: NTDDKStorage
Additional reference words: 4.00



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: February 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.