Hello,
Is there an equivalent event handler in KMDF to the DRIVER_STARTIO routine in WDM? I have a DRIVER_STARTIO routine in a WDM driver, which I am porting to KMDF and I would like to port this code to a framework based driver. IRP_MJ_Xxx requests are a straightforward translation to KMDF event handlers, however I am having difficulty finding the equivalent event handler(s) for the WDM DRIVER_STARTIO routine.
I appreciate any help.
Thank You Very Much,
Earl
xxxxx@gmail.com wrote:
Is there an equivalent event handler in KMDF to the DRIVER_STARTIO routine in WDM? I have a DRIVER_STARTIO routine in a WDM driver, which I am porting to KMDF and I would like to port this code to a framework based driver. IRP_MJ_Xxx requests are a straightforward translation to KMDF event handlers, however I am having difficulty finding the equivalent event handler(s) for the WDM DRIVER_STARTIO routine.
Well, sort of. Itβs not too hard to convert a StartIo driver to KMDF.
Instead of a StartIo routine, you can create a WDFQUEUE and assign an
EvtIoDefault handler. That handler will get all of the IRPs flowing
into the queue. You can decide whether it needs to be a serial queue or
parallel queue. The queue also has the ability to call separate
handlers for the different types of IRP (read, write, ioctl); you might
consider whether it makes sense to split up your big switch statement
and let KMDF do the dispatching.
https://msdn.microsoft.com/en-us/windows/hardware/drivers/wdf/differences-between-wdm-and-kmdf
β
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Startio is basically a sequential queue. It translates really well to a sequential WDFQUEUE (and set the execution level to dispatch level if you want true equivalence)
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Thursday, June 2, 2016 9:57 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF event handler equivalent of DRIVER_STARTIO routine in WDM
Hello,
Is there an equivalent event handler in KMDF to the DRIVER_STARTIO routine in WDM? I have a DRIVER_STARTIO routine in a WDM driver, which I am porting to KMDF and I would like to port this code to a framework based driver. IRP_MJ_Xxx requests are a straightforward translation to KMDF event handlers, however I am having difficulty finding the equivalent event handler(s) for the WDM DRIVER_STARTIO routine.
I appreciate any help.
Thank You Very Much,
Earl
β
NTDEV is sponsored by OSR
Visit the list online at: http:
MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:
To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>
Oh ok, thank you for the reply.
I have implemented a serial queue for IRPs (read, write, ioctl), Pnp, Power. However, since this is not the default queue, it had not occurred to me to set up a default queue and send any requests that are not an IRP to an EvtIoDefault handler to handle all other device IOCTL dispatches.
There is no WDFQUEUE support for pnp or power.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Thursday, June 2, 2016 10:52 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] KMDF event handler equivalent of DRIVER_STARTIO routine in WDM
Oh ok, thank you for the reply.
I have implemented a serial queue for IRPs (read, write, ioctl), Pnp, Power. However, since this is not the default queue, it had not occurred to me to set up a default queue and send any requests that are not an IRP to an EvtIoDefault handler to handle all other device IOCTL dispatches.
β
NTDEV is sponsored by OSR
Visit the list online at: http:
MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:
To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>
I apologize. I misspoke, I am only using a WDFQUEUE for read, write, and ioctl. Pnp and power are simply setup and configured in EvtDeviceAdd, not under WDFQUEUE support. But I appreciate the help in using WDFQUEUE to translate the StartIo routine.