Re: KernelIoControl error 50



By the way: if you're writing a user mode driver you have to specify the
Sysintr value that you want to use in the registry
key for your driver as:

"SysIntr"=dword:17

otherwise the reflector will fail the call to InterruptInitialize
--

Luca Calligaris
www.eurotech.it

"Luca Calligaris" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx> ha scritto nel
messaggio news:eQsZCwJJJHA.4240@xxxxxxxxxxxxxxxxxxxxxxx
Well, since you talk about 'parallel' and 'x86' take a look at
%_WINCEROOT%\PLATFORM\CEPC\FILES\platform.reg:
you'll see:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Parallel]
...
"Dll"="Parallel.Dll"
"SysIntr"=dword:17 ; SYSINTR_FIRMWARE + irq (IRQ5 for LPT2, IRQ7 for LPT1)

Then you may take a look at the parallel port driver in
%_WINCEROOT%\PUBLIC\COMMON\OAK\DRIVERS\PARALLEL
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

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

}

}



--

Luca Calligaris
www.eurotech.it

<vlatko.petkoski@xxxxxxxxxxx> ha scritto nel messaggio
news:8f292076-a985-4011-8fc6-cf742bdbe6f2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
IRQ for parallel port is 7.
If I use SYSINTR_FIRMWARE+7 function
interruptInitialize(g_dwSysInt,g_hevInterrupt,NULL,0)
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,
FALSE, NULL);
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.




.



Relevant Pages

  • Re: WDF and 32 bit process
    ... The driver basically uses a manual to queue to hold the ... When the interrupt fires (continuous reader ... Don Burn (MVP, Windows DDK) ... The interrupt status is passed to the user mode application to ...
    (microsoft.public.development.device.drivers)
  • Re: WDF and 32 bit process
    ... Don Burn (MVP, Windows DDK) ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... The interrupt status is passed to the user mode application to determine ...
    (microsoft.public.development.device.drivers)
  • Re: WDF and 32 bit process
    ... can I have two threads in the user mode app that connects to the same driver one calling CreateFile with an overlapped structure, and the other without an overlapped structure... ... The driver basically uses a manual to queue to hold the request sent by the app. ... When the interrupt fires as a result of changing the switch, it retrieves the request from the queue and completes it. ... The interrupt status is passed to the user mode application to determine the type on interrupt that occured. ...
    (microsoft.public.development.device.drivers)
  • Re: InterruptInitialize Fails
    ... I am encountering the following behaviour: ... I start an event to wait on later and after that I call to the driver ... to set up an interrupt synced with that event (not waiting on the ... and then tries to call InitializeInterrupt with the sysIntr ...
    (microsoft.public.windowsce.embedded)
  • Re: NIC fails in RELEASE build CE 5.0
    ... If the SYSINTR values don't match, your driver's interrupt processing won't ... When the driver called InterruptInitialize, ... I get this sequence repeated while DHCP ...
    (microsoft.public.windowsce.platbuilder)