Re: KernelIoControl error 50

Well, since you talk about 'parallel' and 'x86' take a look at
you'll see:

"SysIntr"=dword:17 ; SYSINTR_FIRMWARE + irq (IRQ5 for LPT2, IRQ7 for LPT1)

Then you may take a look at the parallel port driver in
to see how the interrupt is initialized.

Anyway you should:

1) disable the HW interrupt
2) call CreateEvent
3) call InterruptInitialize with the event you created and the SysIntr value
4) create the IST that will (typically) do something like:

enable HW interrupt

WaitForSingleObject(,INFINITE); //on the event you created
Process interrupt
InterruptDone(); //on the Sysintr




Luca Calligaris

<vlatko.petkoski@xxxxxxxxxxx> ha scritto nel messaggio
IRQ for parallel port is 7.
If I use SYSINTR_FIRMWARE+7 function
failed with error code 87 (ERROR_INVALID_PARAMETER).
I add *IOCTL_HALL_REQUEST_SYSINTR* to OALIOCTL to allow access for
that IOCTL
from user mode.
If I use SYSINTR_FIRMWARE+7 then there is no need to use
KernelIoControl(), am I right ?
Please explain me step by step what I should do exactly?
I'm doing this steps:
1. Create an event g_hevInterrupt = CreateEvent(NULL, FALSE,
2. Call KernelIoControl( )
in step 2 I suppose should use SYSINTR_FIRMWARE+7 instead
KernelIoControl( ) as you say
3. Create thread in SUSPENDED mode CreateThread( )
4. Setting thread priority CeSetThreadPriority( g_htIST,
m_nISTPriority )
5. Call InterruptInitialize(g_dwSysInt,g_hevInterrupt,NULL,0)
6. ResumeThread( g_htIST )

Thanks in advance.