LARGE_INTEGER SysTime , LocalTime;
KeQuerySystemTime(&SysTime);
ExSystemTimeToLocalTime(&SysTime, &LocalTime);
RtlTimeToTimeFields(&SysTime,&tf);
DbgPrint(" %d %d %d %d %d",tf.Year,tf.Month,tf.Day,tf.Hour,tf.Minute);
RtlTimeToTimeFields(&LocalTime,&tf);
DbgPrint(" %d %d %d %d %d",tf.Year,tf.Month,tf.Day,tf.Hour,tf.Minute);
ULONGLONG day= LocalTime.QuadPart * 100 /1000 /1000 /1000 /(24*60*60);
DbgPrint("day %d",day); // 错的
哪错?
谢谢
------解决方案--------------------
ULONGLONG day= LocalTime.QuadPart * 100 /1000 /1000 /1000 /(24*60*60);
//真不知道这是什么意思? /(24 * 60 * 60) 不就是天数了吗? 干嘛还除1000 * 1000 * 1000呢?