[wdmaudiodev] Re: Problem with trying to call IRP from within timer routine

  • From: Walter Oney <waltoney@xxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 11 Dec 2002 21:53:47 -0500

"Michael R. Preston" wrote:
> Hi, all.  I have a WDM filter driver in which I'm trying to create a new
> IRP inside of a periodic timer routine to pass down to the lower-level
> driver.  Everything seems to work OK, except that in the lower-level
> driver's call to IoCompleteRequest(), it looks like it's trying to queue
> an APC (stack says it's in KeInsertQueueAPC()), which is causing a page
> fault because there is no APC associated with the IRP.  Anybody see
> anything like this before?

You might want to pose this question in one of the driver programming
groups, such as comp.os.ms-windows.programmer.net.kernel-mode. My
initial thoughts are along these lines: a "periodic timer routine" would
be a DPC routine that gets called over and over again as a result of
doing a KeSetTimerEx in which you've specified a timer period in
milliseconds. You would necessarily have to create an asynchronous IRP
using IoAllocateIrp or IoBuildAsynchronousFsdRequest because you're
running at DISPATCH_LEVEL in a DPC routine. Most KS IRPs must, however,
be sent at PASSIVE_LEVEL. The driver under yours can screw up in lots of
ways if you call it at DISPATCH_LEVEL when it expects to be at
PASSIVE_LEVEL.

--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com
******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: