LARGE_INTEGER CurrentTime;
LARGE_INTEGER LocalTime;
TIME_FIELDS TimeFiled;
//得到格林威治時間
KeQuerySystemTime(&CurrentTime);
//轉換成本地時間
ExSystemTimeToLocalTime(&CurrentTime, &LocalTime);
//把時間轉換為容易理解的型式
RtlTimeToTimeFields(&LocalTime, &TimeFiled);
KdPrint(("[TimeTest] NowTime : %4d-%2d-%2d %2d:%2d:%2d",
TimeFiled.Year, TimeFiled.Month, TimeFiled.Day,
TimeFiled.Hour, TimeFiled.Minute, TimeFiled.Second));
沒有留言:
張貼留言