Re: WDF and 32 bit process

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



This is the inverted call model, KMDF is new enough that I am not that
familar with all the samples, so while there may be one with this I can't
point you to it. Hopefully someone else on the forum can point you to an
example.

This is overall incredibly easy, you create a queue for the IOCTLs, pending
them for later completion, when the event of interest completes you complete
the IOCTL for the event. You can set things up with either unique IOCTL's
for each type of event, or a generic event IOCTL that reports back the event
type and data.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply




"Ashok Bruno" <nospam.ashok_bruno@xxxxxxxxxxx> wrote in message
news:DD231F47-4B54-45BD-A2BA-5A7EEAFA0D01@xxxxxxxxxxxxxxxx

"Don Burn" <burn@xxxxxxxxxxxxxxxx> wrote in message
news:%23VudRXcoGHA.4040@xxxxxxxxxxxxxxxxxxxxxxx
The interrupt status is passed to the user mode application to determine
the type on interrupt that occured.

Is there an example using WDF that I can use? I saw one in Oney's notify
sample.


First off what do you do with the interrupt status? If this is going to
be passed to the user in the end, consider dumping the event model and
using OVERLAPPED I/O with Ioctl's to provide both the events and the
data.

You can get the IRP look at WdfRequestWdmGetIrp.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"Ashok Bruno" <nospam.ashok_bruno@xxxxxxxxxxx> wrote in message
news:1A8471DA-146D-4967-B964-AFA9C99FE1B5@xxxxxxxxxxxxxxxx

I pass a HANDLE from a user mode application to a driver, and this can
happen as a 32 bit or 64 process. I looked at the different ways to
handle pointer types in the driver and I felt that IoIs32bitProcess
might be the best approach. This function takes in a Irp, and I was
wondering what was the best way to get the Irp from a WDFREQUEST?

Maybe there is a better way to do this overall.... When an interrupt
occurs in my driver I clear the interrupt and save a copy of the
interrupt status register and then signal an event(with a HANDLE) to the
user mode thread. The user mode thread is sitting in a
WaitForMultipleObjects waiting for many such events from the driver,
that need an action maybe signalling the user that an error occurred, or
some other action for functionality. Comments/Suggestions?




.



Relevant Pages

  • 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: 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
    ... I pass a HANDLE from a user mode application to a driver, ... occurs in my driver I clear the interrupt and save a copy of the interrupt ... The user mode thread is sitting in a WaitForMultipleObjects ...
    (microsoft.public.development.device.drivers)
  • Re: sharing memory with user and kernel
    ... There is no need in going to kernel mode for virtual microphone driver, ... Maxim Shatskih, Windows DDK MVP ... I developed an application in user mode that capture audio data and stores ... the data in shared memory using CreateFileMapping and MapViewOfFile. ...
    (microsoft.public.development.device.drivers)
  • Re: WDF and 32 bit process
    ... The interrupt status is passed to the user mode application to determine the type on interrupt that occured. ... I looked at the different ways to handle pointer types in the driver and I felt that IoIs32bitProcess might be the best approach. ... This function takes in a Irp, and I was wondering what was the best way to get the Irp from a WDFREQUEST? ... When an interrupt occurs in my driver I clear the interrupt and save a copy of the interrupt status register and then signal an eventto the user mode thread. ...
    (microsoft.public.development.device.drivers)