Hi again, all
I am still fighting with my pointer device driver.
I have problem with communication. I am using mouclass. So no other program
can access to my driver? So now my program stores data to the registery. But
my driver is unable to fetch data from registery because it is running in
read loop, which is at IRQL 2 (Dispatch_level?)
Do I have any chances to “decrease” IRQL to do the registery read or do I
have any chances to send IOCTL to my driver?
–
Jussi
You cannot lower irql. Using the registry to store dynamic data between
the driver and the app is not going to work, nor is it very perfomant.
You need to create a control device object and use it to communicate
with the filter. If you are using KMDF, you can easily enumerate a raw
PDO to communicate with your filter. The raw PDo has the advantage that
there is a 1:1 relation ship between a filter and the device that the
app communicates to. With a control device, it is 1:N because there is
only one control device for all the devices being filtered.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q262305
describes how to create the control device
the kbfiltr in the KMDF v1.0 distribution demonstrates how to enumerate
a raw PDO for a keyboard filter. Adapting this for a mouse filter is
rather trivial.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jussi Rytilahti
Sent: Tuesday, March 14, 2006 1:13 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Registery question
Hi again, all
I am still fighting with my pointer device driver.
I have problem with communication. I am using mouclass. So no other
program
can access to my driver? So now my program stores data to the registery.
But
my driver is unable to fetch data from registery because it is running
in
read loop, which is at IRQL 2 (Dispatch_level?)
Do I have any chances to “decrease” IRQL to do the registery read or do
I
have any chances to send IOCTL to my driver?
–
Jussi
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
OK, I also thought that lowering Irql is not possible. I thought that
registery would be good for moving data because data is moved propably only
once or twice after driver is installed first time to the system. Registery
is only for calibrating. But because calibration can be happened during the
read loop, registery must be checked after every read.
I will try you way to communicate with IOCTL.
Thanks
Jussi
“Doron Holan” kirjoitti viestissä:xxxxx@ntdev…
You cannot lower irql. Using the registry to store dynamic data between
the driver and the app is not going to work, nor is it very perfomant.
You need to create a control device object and use it to communicate
with the filter. If you are using KMDF, you can easily enumerate a raw
PDO to communicate with your filter. The raw PDo has the advantage that
there is a 1:1 relation ship between a filter and the device that the
app communicates to. With a control device, it is 1:N because there is
only one control device for all the devices being filtered.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q262305
describes how to create the control device
the kbfiltr in the KMDF v1.0 distribution demonstrates how to enumerate
a raw PDO for a keyboard filter. Adapting this for a mouse filter is
rather trivial.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jussi Rytilahti
Sent: Tuesday, March 14, 2006 1:13 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Registery question
Hi again, all
I am still fighting with my pointer device driver.
I have problem with communication. I am using mouclass. So no other
program
can access to my driver? So now my program stores data to the registery.
But
my driver is unable to fetch data from registery because it is running
in
read loop, which is at IRQL 2 (Dispatch_level?)
Do I have any chances to “decrease” IRQL to do the registery read or do
I
have any chances to send IOCTL to my driver?
–
Jussi
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
The registry is a fine place to store calibration data, but you
shouldn’t read it in the read loop. Read it at initialization.
Then when your calibration application recalibrates (I assume this is a
touch screen or something like that), it can write to the registry (to
make the changes permanent) and also send an IOCTL to the driver that
just tells the driver to re-read the registry.
After reading the values out of the registry, you’ll want to actually
update the driver’s internal calibration structure inside a spinlock so
your read loop doesn’t get caught in the middle of an update.
Jussi Rytilahti wrote:
OK, I also thought that lowering Irql is not possible. I thought that
registery would be good for moving data because data is moved propably only
once or twice after driver is installed first time to the system. Registery
is only for calibrating. But because calibration can be happened during the
read loop, registery must be checked after every read.
I will try you way to communicate with IOCTL.
Thanks
Jussi
“Doron Holan” kirjoitti viestissä:xxxxx@ntdev…
> You cannot lower irql. Using the registry to store dynamic data between
> the driver and the app is not going to work, nor is it very perfomant.
> You need to create a control device object and use it to communicate
> with the filter. If you are using KMDF, you can easily enumerate a raw
> PDO to communicate with your filter. The raw PDo has the advantage that
> there is a 1:1 relation ship between a filter and the device that the
> app communicates to. With a control device, it is 1:N because there is
> only one control device for all the devices being filtered.
>
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q262305
> describes how to create the control device
>
> the kbfiltr in the KMDF v1.0 distribution demonstrates how to enumerate
> a raw PDO for a keyboard filter. Adapting this for a mouse filter is
> rather trivial.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Jussi Rytilahti
> Sent: Tuesday, March 14, 2006 1:13 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Registery question
>
> Hi again, all
>
> I am still fighting with my pointer device driver.
>
> I have problem with communication. I am using mouclass. So no other
> program
> can access to my driver? So now my program stores data to the registery.
> But
> my driver is unable to fetch data from registery because it is running
> in
> read loop, which is at IRQL 2 (Dispatch_level?)
>
> Do I have any chances to “decrease” IRQL to do the registery read or do
> I
> have any chances to send IOCTL to my driver?
>
–
Ray