Handling Device Timeouts

A driver can never assume that an expected device interrupt will arrive. The device might be offline; it might be waiting for some kind of operator intervention; or, perhaps it's just broken. This section explains how to use I/O Timer routines to detect unresponsive devices.

How I/O Timer Routines Work

An I/O Timer routine is a (somewhat) optional piece of driver code that an AddDevice routine attaches to a specific Device object. After the timer is started, the I/O Manager begins calling the I/O Timer routine once every second. These calls continue until the timer is explicitly stopped. Table 11.1 lists the functions available for working with I/O timers.

Table 11.2 shows the prototype for the I/O Timer routine itself. ...

Get Windows® 2000 Device Driver Book: A Guide for Programmers, Second Edition, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.