当前位置: 代码迷 >> 驱动开发 >> 关于WDM函数 RtlConvertLongToLargeInteger,该如何解决
  详细解决方案

关于WDM函数 RtlConvertLongToLargeInteger,该如何解决

热度:212   发布时间:2016-04-28 10:01:49.0
关于WDM函数 RtlConvertLongToLargeInteger
在张帆的windows驱动开发书里面,有这么一点代码

//定义3秒后将IRP_MJ_READ的IRP完成
ULONG ulMicroSecond = 3000000;

//将32位整数转化成64位整数
LARGE_INTEGER timeout = RtlConvertLongToLargeInteger(-10*ulMicroSecond);


我想知道,为什么要用-10*ulMicroSecond呢.   或者RtlConvertLongToLargeInteger这个函数的源代码可以有地方找到么.
------解决思路----------------------
你可以看看timeout 最后是什么函数用的,包含的数据是什么来理解为什么代码这么写。
至于函数RtlConvertLongToLargeInteger routine,看其函数说明是:
The RtlConvertLongToLargeInteger routine converts the input signed integer to a signed large integer.