Hi all,
I m writting a minifilter driver and , I want to get Current System Time
If anybody knows which API will be used help me.
Thanks
Hi all,
I m writting a minifilter driver and , I want to get Current System Time
If anybody knows which API will be used help me.
Thanks
KeQuerySystemTime.
L.
KeQuerySystemTime will return you NT native 64bit time, which is called FILETIME in Win32.
There is also RtlTimeToTimeFields which is the same as FileTimeToSystemTime (to year/month/day hour/minute/second)
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntfsd…
> Hi all,
>
> I m writting a minifilter driver and , I want to get Current System Time
>
>
> If anybody knows which API will be used help me.
>
>
> Thanks
>
Also, unless you’re looking for GMT time (system time), you might want to throw a ExSystemTimeToLocalTime() in between KeQuerySystemTime() and RtlTimeToTimeFields().
mm
The vast majority of the time you really do want UTC while in driver land – at least in my experience. Time zones aren’t even per-machine nowadays (consider per-session time zone redirection in TS since Srv03), and even for things like debug or trace logs, it sucks to try and compare log timestamps from two different sites when things are recorded in different time zones.
From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] On Behalf Of xxxxx@evitechnology.com [xxxxx@evitechnology.com]
Sent: Wednesday, September 09, 2009 1:19 PM
To: Windows File Systems Devs Interest List
Subject: RE:[ntfsd] Get System Time
Also, unless you’re looking for GMT time (system time), you might want to throw a ExSystemTimeToLocalTime() in between KeQuerySystemTime() and RtlTimeToTimeFields().
mm
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer