Author: tkreuzer
Date: Tue Aug 11 17:45:56 2015
New Revision: 68692
URL:
http://svn.reactos.org/svn/reactos?rev=68692&view=rev
Log:
[WIN32K]
Implement EngQueryLocalTime.
This commit would not have been possible without Colin's SVN superpowers.
Modified:
trunk/reactos/win32ss/gdi/eng/stubs.c
Modified: trunk/reactos/win32ss/gdi/eng/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/stubs.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/stubs.c [iso-8859-1] Tue Aug 11 17:45:56 2015
@@ -284,10 +284,21 @@
VOID
APIENTRY
-EngQueryLocalTime(OUT PENG_TIME_FIELDS ptf)
-{
- //
www.osr.com/ddk/graphics/gdifncs_389z.htm
- UNIMPLEMENTED;
+EngQueryLocalTime(
+ _Out_ PENG_TIME_FIELDS ptf)
+{
+ LARGE_INTEGER liSystemTime, liLocalTime;
+ NT_ASSERT(ptf != NULL);
+
+ /* Query the system time */
+ KeQuerySystemTime(&liSystemTime);
+
+ /* Convert it to local time */
+ ExSystemTimeToLocalTime(&liSystemTime, &liLocalTime);
+
+ /* Convert the local time into time fields
+ (note that ENG_TIME_FIELDS is identical to TIME_FIELDS) */
+ RtlTimeToTimeFields(&liLocalTime, (PTIME_FIELDS)ptf);
}
ULONG