Hello Mark,
Thursday, July 10, 2003, 6:18:18 PM, you wrote:
RM> There should be no conflict between your two separate dpc objects.
RM> You might want to include how exactly you are calling
RM> KeSetTimerEx, as in the actual parameters that you are supplying.
RM> Either you have made an error in the call to the api, or you have
RM> some other logic error in your program that is preventing your
RM> timer dpc from running. Locking perhaps?
There’s no locking used in that code, and there’s too much code to
include to reveal logic errors. 
I’ve figured out that the timer stops calling back the DPC just after
ANY OTHER DPC have been executed, although all DPCs in the driver use
different DPC objects (and different timer objects if they need it).
I’ve worked around the problem by adding KeSetTimerEx for the problem
timer to the end of any other DPC. Well, that’s not a perfect solution,
but it works and I unfortunately have no time to spend on that
issue.
If someone had faced situations of the like, it would be a great help
if you propose possible solution.
Thank you for suggestions Mark.
-----Original Message-----
From: D. Lex [mailto:list1686@nm.ru]
Sent: Thursday, July 10, 2003 10:10 AM
To: NT Developers Interest List
Subject: [ntdev] KeSetTimerEx with DPC
Hi all,
I use KeSetTimerEx to make a DPC be called periodically, say once in 100 ms.
Everything’s going ok (the DPC is called as I wanted it to) until I’m doing
something more than simple condition checking in the DPC. After that, the
DPC is called no more, although I didn’t call KeCancelTimer.
The job the DPC is doing before it stops includes a call to KeInsertQueueDpc
(for another DPC). Is that what stops the timer from calling the DPC any
more? Or maybe there could be another reason?
Generally, if I schedule a timer this way to call a DPC periodically, can I
be sure that the timer won’t stop until I would tell him to do it with
KeCancelTimer?
–
Best regards,
D.