Tech Support > Microsoft Windows > Drivers > Re: Keinitializetimer
Re: Keinitializetimer
Posted by Walter Oney on August 15th, 2003


Raj wrote:
Because they may change the way it works someday.

Don't confuse KeInitializeTimer and KeSetTimer -- they do different
things.

Yes. DPC routines are always called at DISPATCH_LEVEL.

--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com

Posted by Raj on August 16th, 2003


Step 0: A timer is associated with every item in the queue.

Step 1: Queued Irp and released spinlock.

Step2: Initialize timer, SetTimer().

Step3: Cancel Timer, CompleteIrp().

Now if get step 1 to step 3 as in sequence, NO problem.

If step 1 occurs and step 3(which is happening in my case and
CancelTimer can bring surprises becoz Step2 has not yet started), I
want to move InitializeTimer to Step1 and to gaurantee it is
initialised, I want to move it into SpinLock but as usual DDK never
agrees with whatever I plan.

I always feel my hands are tied when I am developing Microsoft
programs or drivers