在张帆的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.