Parallel Port IRQs

A VxD should use port resources (I/O port addresses, IRQs, DMA channels, and so on) specified in the device node for the parallel port. If the VxD is a VCOMM port driver, a device node handle will be passed in when the device is opened. Otherwise, a VxD must use configuration manager services to obtain the device node handle, see for information about how to do this.

However, non-Plug and Play parallel port device nodes usually will not specify an IRQ because Windows 95 detection does not assign these nodes by default to avoid resource conflicts with sound cards and other devices that commonly overlap LPT port settings. If the user does not manually select an IRQ in the Device Manager page of the System control panel, the device node will have only I/O port addresses assigned.

When a VxD driver requires an IRQ, but none is specified in the port device node, the driver should follow this procedure to find the proper IRQ:

1. Use the IRQ recorded for the port the last time that it was used.

2. If no IRQ was recorded or the device is not found at that IRQ, the driver should check the most common default IRQ for the port (for example, IRQ7 for LPT1).

3. If the device is not found using the common default, the driver should try other IRQs as appropriate.

When the device is located, the driver should record the IRQ for future use. "Touched" IRQs should be allocated and deallocated properly using VPICD services. A side-effect of allocating an IRQ in a "touched" fashion is that it becomes unavailable for assignment to Plug and Play devices that arrive during the remainder of the Windows session (for example, PCMCIA cards). This is why it is important to minimize the number of "touched" IRQs using the procedure documented above.