Hi,
I want to connect my own ISR to the parralelport. I do not want to use the
method provided by the microsoft driver, because i need to know the exact
time, when the parallelport fires the interrupt.
So, i try to initialize the parport in this way:
WRITE_PORT_UCHAR((PUCHAR) BASE_ADR, 255); // 255 to the parport base
WRITE_PORT_UCHAR((PUCHAR) PAR_CONTROL, 4); // 4 to the control of the
parport
WRITE_PORT_UCHAR((PUCHAR)PAR_CONTROL, READ_PORT_UCHAR((PUCHAR)PAR_CONTROL) |
0x10);
WRITE_PORT_UCHAR((PUCHAR)0x21, READ_PORT_UCHAR((PUCHAR)0x21) & 0xdf);
This should enable the interrupt in the APIC and the parport.
Then i use the HalGetInterruptVector() and IoConnectInterrupt() to connect
my ISR to the parport.
I think that this part is correct, because when the microsoft parport-driver
uses interrupt my own ISR also receives every second interrupt. But only
every second, and i receive nothing when irq handling is turned off in the
ms driver. So there must be something what the ms driver does, but i do not
know what. I also tried this example:
http://www.beyondlogic.org/interrupts/winnt_isr_dpc.htm
It also doesn’t work.
So, please help me, thx a lot!
Oliver Urbann
> I want to connect my own ISR to the parralelport.
Then use the documented way:
Issue IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT using IoCallDriver() and set your own routine. Mind the registry value named "EnableConnectInterruptIoctl" as pointed out in the documentation.
In the WNET DDK you will find an article with the title "Connecting an Interrupt Service Routine to a Parallel Port"
I also tried this example:
http://www.beyondlogic.org/interrupts/winnt_isr_dpc.htm
It also doesn't work.
I personally believe that this example is highly dangerous (however, it shows setting the ISR). There are reasons to not talk to a hardware device if a driver is already connected. Either you replace the MS driver or you play by the rules.
Oliver
May the source be with you, stranger 
ICQ: #281645
URL: http://assarbad.net
> I want to connect my own ISR to the parralelport. I do not want to use the
You cannot, unless you will replace the whole parport.sys
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
“Maxim S. Shatskih” schrieb im Newsbeitrag
news:xxxxx@ntdev…
>> I want to connect my own ISR to the parralelport. I do not want to use
>> the
>
> You cannot, unless you will replace the whole parport.sys
Ok i would do this. I found the sourcecode for the parport.sys in the
Windows DDK, and changed many things, so i can use the ISR of the example
driver. But this is MS code, and i want to understand what i have to do in
my own driver. But even if i disable the parport.sys, i do not receive any
interrupts from the parport.
Oliver