驱动中 定时

NTSTATUS 
   KeWaitForSingleObject(
    IN PVOID   Object ,
    IN KWAIT_REASON   WaitReason ,
    IN KPROCESSOR_MODE   WaitMode ,
    IN BOOLEAN   Alertable ,
    IN PLARGE_INTEGER   Timeout   OPTIONAL   // Pointer to a time-out value that specifies the absolute or relative time, in 100 nanosecond units, 
    );


VOID 
   KeStallExecutionProcessor(
    IN ULONG
   MicroSeconds                     // Specifies the number of microseconds to stall.
    );


BOOLEAN 
   KeSetTimer(
    IN PKTIMER
   Timer ,
    IN LARGE_INTEGER
   DueTime , // Specifies the absolute or relative time at which the timer is to expire. If the value of the DueTime parameter is negative, the expiration time is relative to the current system time. Otherwise, the expiration time is absolute. The expiration time is expressed in system time units (100-nanosecond intervals). Absolute expiration times track any changes in the system time; relative expiration times are not affected by system time changes.
    IN PKDPC
   Dpc    OPTIONAL
    );


为了重复地调用CustomTimerDpc例程,使用KeSetTimerEx来设置定时器,并在Period参数中规定一个再次发生的间隔。除了这个附加的参数,KeSetTimerEx就象KeSetTimer一样。

转载于:https://my.oschina.net/riseworlds/blog/696614

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值