// JP opened flex table

Click to See Complete Forum and Search --> : How to get and reserve free IRQ from Windows. (really specific topic)


janisdz
September 23rd, 2004, 10:19 AM
Hi,
Here is the problem:
I am designing driver for a device which is capable of generating interrupts and routing them to some IRQ.
Question is:
1) how to get the information about available IRQs from windows?
2) how to claim the available IRQ and tell windows "I'm using it"

I have tried using HalGetInterruptVector() which maps IRQ to IRQL and then use it in the call to IoConnectInterrupt().
This works except that I must know in advance that e.g. IRQ7 is not used already by any device.
As I understand the right way to do it is to call IoConnectInterrupt() from IRP_MN_START_DEVICE handler. The problem here is that windows never calls it, instead after calling DriverEntry, it calls DriverUnload and tells the user:
"System error 1058 has occurred.
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it."

Maybe somewhere are some samples how to call the IoReportResourceForDetection and IoReportDetectedDevice functions?

Maybe someone can shed some light on this.

Janis

kas
March 6th, 2005, 09:00 PM
Hi,

I am trying to generate a interrupt for a parallel port device and could not get it to work. I am wondering you have any success?

Rgds,
kas

//JP added flex table