## The HARDERR Sample

The HARDERR Sample accompanies Appendix A and illustrates how to log an I/O error. The real purpose of this sample is to demonstrate how to use the Windows 98/Me implementation of IoRaiseInformationalHardError that was added to WDMSTUB.VXD in Service Pack 2 for the 1st edition.

The sample includes one component:

- HARDERR.SYS is a WDM driver for a non-existent hardware device.

### Building HARDERR

To build HARDERR.SYS, follow the general instructions for building a WDM sample. The Microsoft Visual C++ project file is named HARDERR.DSP.

### Testing HARDERR

Follow the general instructions for using FastInst in either Windows XP or Windows 98/Me. The INF file is named HARDERR.INF. Each time you start the HARDERR device (including the first time, which occurs during installation), it will call IoRaiseInformationalHardError, which will in turn display a dialog box informing you of an unspecified error.

### What to look for

It would more interesting to look at the implementation of IoRaiseInformationalHardError in wdmstub.sys than at this sample.