problem with KeDelayExecutionThread

hi, all

i call KeDelayExecutionThread during Ioctl in driver, code is below:

KdPrint((“Sleep 100 ms.\n”));

KeQuerySystemTime(&DelayBegin);

Delay.QuadPart=100*10*1000;

ntStatus=KeDelayExecutionThread(KernelMode,FALSE,&Delay);

KeQuerySystemTime(&DelayEnd);

KdPrint((“Actually sleep time %d,Status %d\n”,(DelayEnd.QuadPart-DelayBegin.QuadPart),ntStatus));

in softice, i saw the output message, “Actual Sleep time 0, Status 0”. it seems KeDelayExecutionThread does not work. how can i let it work in my driver? thank a lot.

metawest

=============================================================

ÂòÐéÄâÖ÷»úË͹ú¼ÊÓòÃû¼°ÓÊÏä

ÒÚÌÆÉú»îÆ·ÅÆµÚÒ»Ö÷´ò

ÒÚÌÆ¶ÌÐÅ£¬ÄúÌùÉíµÄʱÉйËÎÊ

ÃÀ¹ú´óѧ֮ÃÅΪÄã¶ø¿ª °Ù·Ö°ÙÄý±Ñ§½ð

Hi~ metawest

???you should do “Delay.QuadPart=-100*10*1000;”
then try it again;

======= At 2002-09-28 18:43:00 Your wrote:=======

hi, all

i call KeDelayExecutionThread during Ioctl in driver, code is below:

KdPrint((“Sleep 100 ms.\n”));

KeQuerySystemTime(&DelayBegin);

Delay.QuadPart=100*10*1000;

ntStatus=KeDelayExecutionThread(KernelMode,FALSE,&Delay);

KeQuerySystemTime(&DelayEnd);

KdPrint((“Actually sleep time d,Status d\n”,(DelayEnd.QuadPart-DelayBegin.QuadPart),ntStatus));

in softice, i saw the output message, “Actual Sleep time 0, Status 0”. it seems KeDelayExecutionThread does not work. how can i let it work in my driver? thank a lot.

metawest


You are currently subscribed to ntdev as: xxxxx@zcxc.com.cn
To unsubscribe send a blank email to %%email.unsub%%

= = = = = = = = = = = = = = = = = = = =

Liang Quan wrote:

Hi~ metawest

¡¡¡¡you should do “Delay.QuadPart=-100*10*1000;”
then try it again;
> in softice, i saw the output message, “Actual Sleep time 0, Status 0”. it seems KeDelayExecutionThread does not work. how can i let it work in my driver? thank a lot.

Exactly so. The original, positive number asked to be woken up as soon
as possible after midnight + 100 ms on Jan. 1, 1601…


Walter Oney, Consulting and Training
Check out new US seminar schedule at http://www.oneysoft.com

Thank you. You are right, now the problem is solved.
I then read ddk , the fact is just like what you said. but the parameter usage is a little strange…

----- Original Message -----
From: “Walter Oney”
Sent: Saturday, September 28, 2002 8:40 PM
Subject: Re: problem with KeDelayExecutionThread

> Liang Quan wrote:
> > Hi~ metawest
> >
> > ???you should do “Delay.QuadPart=-100101000;”
> > then try it again;
> > > in softice, i saw the output message, “Actual Sleep time 0, Status 0”. it seems KeDelayExecutionThread does not work. how can i let it work in my driver? thank a lot.
>
> Exactly so. The original, positive number asked to be woken up as soon
> as possible after midnight + 100 ms on Jan. 1, 1601…
>
> –
> Walter Oney, Consulting and Training
> Check out new US seminar schedule at http://www.oneysoft.com