OSR Dev Blog

Disabling Hard Error Pop-ups
(By: Hector J. Rodriguez | Published: 15-Feb-03| Modified: 11-Mar-03)

A number of times recently we?ve seen discussions about how to disable hard error popups in a kernel driver.  For example, a driver that wishes to probe the floppy drive does not want a dialog box to pop up as a result of its probe.  This is easily achieved using the function IoSetThreadHardErrorMode, which will  ensure that the annoying dialog box does not appear.


Correct usage for this is:


    BOOLEAN oldHardErrorMode;


    oldHardErrorMode = IoSetThreadHardErrorMode(TRUE);

    // perform protected operation

    (void) IoSetThreadHardErrorMode(oldHardErrorMode);


This article was printed from OSR Online http://www.osronline.com

Copyright 2017 OSR Open Systems Resources, Inc.