Making delay for 10 seconds

Hi
i need to make 10 seconds delay in my driver. Can anyone help me in this regards providing some api or sending some links ?

With thanks in advance,
barun

LARGE_INTEGER interval;

interval.QuadPart = -10*1000*1000*10; // 10 secs
KeDelayExecutionThread( KernelMode, FALSE, &interval )

-pk

wrote in message news:xxxxx@ntdev…
> Hi
> i need to make 10 seconds delay in my driver. Can anyone help me in this
> regards providing some api or sending some links ?
>
> With thanks in advance,
> barun
>

> LARGE_INTEGER interval;

interval.QuadPart = -10*1000*1000*10; // 10 secs
KeDelayExecutionThread( KernelMode, FALSE, &interval )

This is correct if you want to delay a thread for 10 seconds. If you want to delay an IRP for 10 seconds, then place it in a manual queue, start a timer, and have the timer remove it from the queue and complete it.

KMDF links:
Framework queue objects: http://msdn2.microsoft.com/en-us/library/aa490073.aspx
Using timers: http://msdn2.microsoft.com/en-us/library/aa490296.aspx

For non-KMDF, do the same with an IO_CSQ and a KTIMER.

-Steve

xxxxx@gmail.com wrote:

i need to make 10 seconds delay in my driver. Can anyone help me in this regards providing some api or sending some links ?

What’s the purpose for the delay? The proper answer depends on what you
are in the middle of doing.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.