ReactOS 0.4.15-dev-5664-g3bf4ef6
time.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: dll/win32/kernel32/client/time.c
5 * PURPOSE: Time conversion functions
6 * PROGRAMMER: Ariadne
7 * DOSDATE and DOSTIME structures from Onno Hovers
8 * UPDATE HISTORY:
9 * Created 19/01/99
10 */
11
12/* INCLUDES *******************************************************************/
13
14#include <k32.h>
15
16#define NDEBUG
17#include <debug.h>
18
19/* FUNCTIONS ******************************************************************/
20
21/*
22 * @implemented
23 */
24BOOL
27{
28 /* Return if a TS Timezone ID is active */
30}
31
32/*
33 * @implemented
34 */
35BOOL
38 OUT LPWORD lpFatDate,
39 OUT LPWORD lpFatTime)
40{
41 LARGE_INTEGER FileTime;
43
44 FileTime.HighPart = lpFileTime->dwHighDateTime;
45 FileTime.LowPart = lpFileTime->dwLowDateTime;
46
47 if (FileTime.QuadPart < 0)
48 {
50 return FALSE;
51 }
52
54 if ((TimeFields.Year < 1980) || (TimeFields.Year > 2107))
55 {
57 return FALSE;
58 }
59
60 *lpFatDate = (TimeFields.Day) |
61 (TimeFields.Month << 5) |
62 ((TimeFields.Year - 1980) << 9);
63 *lpFatTime = (TimeFields.Second >> 1) |
64 (TimeFields.Minute << 5) |
65 (TimeFields.Hour << 11);
66
67 return TRUE;
68}
69
70/*
71 * @implemented
72 */
73BOOL
76 IN WORD wFatTime,
77 OUT LPFILETIME lpFileTime)
78{
80 LARGE_INTEGER SystemTime;
81
82 TimeFields.Year = (wFatDate >> 9) + 1980;
83 TimeFields.Month = (wFatDate >> 5) & 0xF;
84 TimeFields.Day = (wFatDate & 0x1F);
85 TimeFields.Hour = (wFatTime >> 11);
86 TimeFields.Minute = (wFatTime >> 5) & 0x3F;
87 TimeFields.Second = (wFatTime & 0x1F) << 1;
89
90 if (RtlTimeFieldsToTime(&TimeFields, &SystemTime))
91 {
92 lpFileTime->dwLowDateTime = SystemTime.LowPart;
93 lpFileTime->dwHighDateTime = SystemTime.HighPart;
94 return TRUE;
95 }
96
98 return FALSE;
99}
100
101/*
102 * @implemented
103 */
104LONG
105WINAPI
107 IN CONST FILETIME *lpFileTime2)
108{
109 LARGE_INTEGER Time1, Time2, Diff;
110
111 Time1.LowPart = lpFileTime1->dwLowDateTime;
112 Time2.LowPart = lpFileTime2->dwLowDateTime;
113 Time1.HighPart = lpFileTime1->dwHighDateTime;
114 Time2.HighPart = lpFileTime2->dwHighDateTime;
115
116 Diff.QuadPart = Time1.QuadPart - Time2.QuadPart;
117
118 if (Diff.HighPart < 0) return -1;
119 if (Diff.QuadPart == 0) return 0;
120 return 1;
121}
122
123/*
124 * @implemented
125 */
126VOID
127WINAPI
129{
130 LARGE_INTEGER SystemTime;
131
132 do
133 {
134 SystemTime.HighPart = SharedUserData->SystemTime.High1Time;
135 SystemTime.LowPart = SharedUserData->SystemTime.LowPart;
136 }
137 while (SystemTime.HighPart != SharedUserData->SystemTime.High2Time);
138
139 lpFileTime->dwLowDateTime = SystemTime.LowPart;
140 lpFileTime->dwHighDateTime = SystemTime.HighPart;
141}
142
143/*
144 * @unimplemented
145 */
146VOID
147WINAPI
149{
150 STUB;
151}
152
153/*
154 * @implemented
155 */
156BOOL
157WINAPI
159 OUT LPFILETIME lpFileTime)
160{
162 LARGE_INTEGER liTime;
163
164 TimeFields.Year = lpSystemTime->wYear;
165 TimeFields.Month = lpSystemTime->wMonth;
166 TimeFields.Day = lpSystemTime->wDay;
167 TimeFields.Hour = lpSystemTime->wHour;
168 TimeFields.Minute = lpSystemTime->wMinute;
169 TimeFields.Second = lpSystemTime->wSecond;
170 TimeFields.Milliseconds = lpSystemTime->wMilliseconds;
171
172 if (RtlTimeFieldsToTime(&TimeFields, &liTime))
173 {
174 lpFileTime->dwLowDateTime = liTime.u.LowPart;
175 lpFileTime->dwHighDateTime = liTime.u.HighPart;
176 return TRUE;
177 }
178
180 return FALSE;
181}
182
183/*
184 * @implemented
185 */
186BOOL
187WINAPI
189 OUT LPSYSTEMTIME lpSystemTime)
190{
192 LARGE_INTEGER liTime;
193
194 liTime.u.LowPart = lpFileTime->dwLowDateTime;
195 liTime.u.HighPart = lpFileTime->dwHighDateTime;
196 if (liTime.QuadPart < 0)
197 {
199 return FALSE;
200 }
201
203
204 lpSystemTime->wYear = TimeFields.Year;
205 lpSystemTime->wMonth = TimeFields.Month;
206 lpSystemTime->wDay = TimeFields.Day;
207 lpSystemTime->wHour = TimeFields.Hour;
208 lpSystemTime->wMinute = TimeFields.Minute;
209 lpSystemTime->wSecond = TimeFields.Second;
210 lpSystemTime->wMilliseconds = TimeFields.Milliseconds;
211 lpSystemTime->wDayOfWeek = TimeFields.Weekday;
212
213 return TRUE;
214}
215
216/*
217 * @implemented
218 */
219BOOL
220WINAPI
222 OUT LPFILETIME lpLocalFileTime)
223{
224 LARGE_INTEGER TimeZoneBias, FileTime;
225 volatile KSYSTEM_TIME *TimePtr;
226
227 TimePtr = IsTimeZoneRedirectionEnabled() ?
229 &SharedUserData->TimeZoneBias;
230 do
231 {
232 TimeZoneBias.HighPart = TimePtr->High1Time;
233 TimeZoneBias.LowPart = TimePtr->LowPart;
234 }
235 while (TimeZoneBias.HighPart != TimePtr->High2Time);
236
237 FileTime.LowPart = lpFileTime->dwLowDateTime;
238 FileTime.HighPart = lpFileTime->dwHighDateTime;
239
240 FileTime.QuadPart -= TimeZoneBias.QuadPart;
241
242 lpLocalFileTime->dwLowDateTime = FileTime.LowPart;
243 lpLocalFileTime->dwHighDateTime = FileTime.HighPart;
244
245 return TRUE;
246}
247
248/*
249 * @implemented
250 */
251BOOL
252WINAPI
254 OUT LPFILETIME lpFileTime)
255{
256 LARGE_INTEGER TimeZoneBias, FileTime;
257 volatile KSYSTEM_TIME *TimePtr;
258
259 TimePtr = IsTimeZoneRedirectionEnabled() ?
261 &SharedUserData->TimeZoneBias;
262
263 do
264 {
265 TimeZoneBias.HighPart = TimePtr->High1Time;
266 TimeZoneBias.LowPart = TimePtr->LowPart;
267 }
268 while (TimeZoneBias.HighPart != TimePtr->High2Time);
269
270 FileTime.LowPart = lpLocalFileTime->dwLowDateTime;
271 FileTime.HighPart = lpLocalFileTime->dwHighDateTime;
272
273 FileTime.QuadPart += TimeZoneBias.QuadPart;
274
275 lpFileTime->dwLowDateTime = FileTime.LowPart;
276 lpFileTime->dwHighDateTime = FileTime.HighPart;
277
278 return TRUE;
279}
280
281/*
282 * @implemented
283 */
284VOID
285WINAPI
287{
288 LARGE_INTEGER SystemTime, TimeZoneBias;
290 volatile KSYSTEM_TIME *TimePtr;
291
292 do
293 {
294 SystemTime.HighPart = SharedUserData->SystemTime.High1Time;
295 SystemTime.LowPart = SharedUserData->SystemTime.LowPart;
296 }
297 while (SystemTime.HighPart != SharedUserData->SystemTime.High2Time);
298
299 TimePtr = IsTimeZoneRedirectionEnabled() ?
301 &SharedUserData->TimeZoneBias;
302 do
303 {
304 TimeZoneBias.HighPart = TimePtr->High1Time;
305 TimeZoneBias.LowPart = TimePtr->LowPart;
306 }
307 while (TimeZoneBias.HighPart != TimePtr->High2Time);
308
309 SystemTime.QuadPart -= TimeZoneBias.QuadPart;
310 RtlTimeToTimeFields(&SystemTime, &TimeFields);
311
312 lpSystemTime->wYear = TimeFields.Year;
313 lpSystemTime->wMonth = TimeFields.Month;
314 lpSystemTime->wDay = TimeFields.Day;
315 lpSystemTime->wHour = TimeFields.Hour;
316 lpSystemTime->wMinute = TimeFields.Minute;
317 lpSystemTime->wSecond = TimeFields.Second;
318 lpSystemTime->wMilliseconds = TimeFields.Milliseconds;
319 lpSystemTime->wDayOfWeek = TimeFields.Weekday;
320}
321
322/*
323 * @implemented
324 */
325VOID
326WINAPI
328{
329 LARGE_INTEGER SystemTime;
331
332 do
333 {
334 SystemTime.HighPart = SharedUserData->SystemTime.High1Time;
335 SystemTime.LowPart = SharedUserData->SystemTime.LowPart;
336 }
337 while (SystemTime.HighPart != SharedUserData->SystemTime.High2Time);
338
339 RtlTimeToTimeFields(&SystemTime, &TimeFields);
340
341 lpSystemTime->wYear = TimeFields.Year;
342 lpSystemTime->wMonth = TimeFields.Month;
343 lpSystemTime->wDay = TimeFields.Day;
344 lpSystemTime->wHour = TimeFields.Hour;
345 lpSystemTime->wMinute = TimeFields.Minute;
346 lpSystemTime->wSecond = TimeFields.Second;
347 lpSystemTime->wMilliseconds = TimeFields.Milliseconds;
348 lpSystemTime->wDayOfWeek = TimeFields.Weekday;
349}
350
351/*
352 * @implemented
353 */
354BOOL
355WINAPI
357{
358 LARGE_INTEGER NewSystemTime, TimeZoneBias;
362 PVOID State;
363 volatile KSYSTEM_TIME *TimePtr;
364
365 TimePtr = IsTimeZoneRedirectionEnabled() ?
367 &SharedUserData->TimeZoneBias;
368 do
369 {
370 TimeZoneBias.HighPart = TimePtr->High1Time;
371 TimeZoneBias.LowPart = TimePtr->LowPart;
372 }
373 while (TimeZoneBias.HighPart != TimePtr->High2Time);
374
375 TimeFields.Year = lpSystemTime->wYear;
376 TimeFields.Month = lpSystemTime->wMonth;
377 TimeFields.Day = lpSystemTime->wDay;
378 TimeFields.Hour = lpSystemTime->wHour;
379 TimeFields.Minute = lpSystemTime->wMinute;
380 TimeFields.Second = lpSystemTime->wSecond;
381 TimeFields.Milliseconds = lpSystemTime->wMilliseconds;
382
383 if (!RtlTimeFieldsToTime(&TimeFields, &NewSystemTime))
384 {
386 return FALSE;
387 }
388
389 NewSystemTime.QuadPart += TimeZoneBias.QuadPart;
390
392 if (NT_SUCCESS(Status))
393 {
394 Status = NtSetSystemTime(&NewSystemTime, NULL);
396 }
397
398 if (!NT_SUCCESS(Status))
399 {
401 return FALSE;
402 }
403
404 return TRUE;
405}
406
407/*
408 * @implemented
409 */
410BOOL
411WINAPI
413{
414 LARGE_INTEGER NewSystemTime;
418 PVOID State;
419
420 TimeFields.Year = lpSystemTime->wYear;
421 TimeFields.Month = lpSystemTime->wMonth;
422 TimeFields.Day = lpSystemTime->wDay;
423 TimeFields.Hour = lpSystemTime->wHour;
424 TimeFields.Minute = lpSystemTime->wMinute;
425 TimeFields.Second = lpSystemTime->wSecond;
426 TimeFields.Milliseconds = lpSystemTime->wMilliseconds;
427
428 if (!RtlTimeFieldsToTime(&TimeFields, &NewSystemTime))
429 {
431 return FALSE;
432 }
433
435 if (NT_SUCCESS(Status))
436 {
437 Status = NtSetSystemTime(&NewSystemTime, NULL);
439 }
440
441 if (!NT_SUCCESS(Status))
442 {
444 return FALSE;
445 }
446
447 return TRUE;
448}
449
450/*
451 * @implemented
452 */
453DWORD
454WINAPI
456{
457 ULARGE_INTEGER TickCount;
458
459#ifdef _WIN64
460 TickCount.QuadPart = *((volatile ULONG64*)&SharedUserData->TickCount);
461#else
462 while (TRUE)
463 {
464 TickCount.HighPart = (ULONG)SharedUserData->TickCount.High1Time;
465 TickCount.LowPart = SharedUserData->TickCount.LowPart;
466
467 if (TickCount.HighPart == (ULONG)SharedUserData->TickCount.High2Time)
468 break;
469
471 }
472#endif
473
474 return (ULONG)((UInt32x32To64(TickCount.LowPart,
475 SharedUserData->TickCountMultiplier) >> 24) +
476 UInt32x32To64((TickCount.HighPart << 8) & 0xFFFFFFFF,
477 SharedUserData->TickCountMultiplier));
478
479}
480
481/*
482 * @implemented
483 */
484BOOL
485WINAPI
487 OUT PDWORD lpTimeIncrement,
488 OUT PBOOL lpTimeAdjustmentDisabled)
489{
492
494 &TimeInfo,
495 sizeof(TimeInfo),
496 NULL);
497 if (!NT_SUCCESS(Status))
498 {
500 return FALSE;
501 }
502
503 *lpTimeAdjustment = (DWORD)TimeInfo.TimeAdjustment;
504 *lpTimeIncrement = (DWORD)TimeInfo.TimeIncrement;
505 *lpTimeAdjustmentDisabled = (BOOL)TimeInfo.Enable;
506
507 return TRUE;
508}
509
510/*
511 * @implemented
512 */
513BOOL
514WINAPI
516 IN BOOL bTimeAdjustmentDisabled)
517{
520
521 TimeInfo.TimeAdjustment = (ULONG)dwTimeAdjustment;
522 TimeInfo.Enable = (BOOLEAN)bTimeAdjustmentDisabled;
523
525 &TimeInfo,
526 sizeof(TimeInfo));
527 if (!NT_SUCCESS(Status))
528 {
530 return FALSE;
531 }
532
533 return TRUE;
534}
535
536/*
537 * @implemented
538 */
539BOOL
540WINAPI
542 OUT LPFILETIME lpKernelTime OPTIONAL,
543 OUT LPFILETIME lpUserTime OPTIONAL)
544{
546 LARGE_INTEGER TotalUserTime, TotalKernTime, TotalIdleTime;
548 CCHAR i;
550
551 TotalUserTime.QuadPart = TotalKernTime.QuadPart = TotalIdleTime.QuadPart = 0;
552
555
556 ProcPerfInfo = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferSize);
557 if (!ProcPerfInfo)
558 {
560 return FALSE;
561 }
562
564 ProcPerfInfo,
566 &ReturnLength);
568 {
569 if (lpIdleTime)
570 {
572 {
573 TotalIdleTime.QuadPart += ProcPerfInfo[i].IdleTime.QuadPart;
574 }
575
576 lpIdleTime->dwLowDateTime = TotalIdleTime.LowPart;
577 lpIdleTime->dwHighDateTime = TotalIdleTime.HighPart;
578 }
579
580 if (lpKernelTime)
581 {
583 {
584 TotalKernTime.QuadPart += ProcPerfInfo[i].KernelTime.QuadPart;
585 }
586
587 lpKernelTime->dwLowDateTime = TotalKernTime.LowPart;
588 lpKernelTime->dwHighDateTime = TotalKernTime.HighPart;
589 }
590
591 if (lpUserTime)
592 {
594 {
595 TotalUserTime.QuadPart += ProcPerfInfo[i].UserTime.QuadPart;
596 }
597
598 lpUserTime->dwLowDateTime = TotalUserTime.LowPart;
599 lpUserTime->dwHighDateTime = TotalUserTime.HighPart;
600 }
601 }
602 else if (NT_SUCCESS(Status))
603 {
605 }
606
607 RtlFreeHeap(RtlGetProcessHeap(), 0, ProcPerfInfo);
608 if (!NT_SUCCESS(Status))
609 {
611 return FALSE;
612 }
613
614 return TRUE;
615}
616
617/*
618 * @unimplemented
619 */
620BOOL
621WINAPI
623{
624 STUB;
625 return 0;
626}
627
628/* EOF */
NTSYSAPI NTSTATUS NTAPI NtSetSystemInformation(IN INT SystemInformationClass, IN PVOID SystemInformation, IN ULONG SystemInformationLength)
LONG NTSTATUS
Definition: precomp.h:26
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
#define BufferSize
Definition: mmc.h:75
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
PBASE_STATIC_SERVER_DATA BaseStaticServerData
Definition: dllmain.c:19
BOOL WINAPI SetClientTimeZoneInformation(IN CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation)
Definition: time.c:622
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:128
BOOL WINAPI GetSystemTimes(OUT LPFILETIME lpIdleTime OPTIONAL, OUT LPFILETIME lpKernelTime OPTIONAL, OUT LPFILETIME lpUserTime OPTIONAL)
Definition: time.c:541
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:188
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
Definition: time.c:158
BOOL WINAPI SetSystemTimeAdjustment(IN DWORD dwTimeAdjustment, IN BOOL bTimeAdjustmentDisabled)
Definition: time.c:515
BOOL WINAPI SetLocalTime(IN CONST SYSTEMTIME *lpSystemTime)
Definition: time.c:356
BOOL WINAPI GetSystemTimeAdjustment(OUT PDWORD lpTimeAdjustment, OUT PDWORD lpTimeIncrement, OUT PBOOL lpTimeAdjustmentDisabled)
Definition: time.c:486
BOOL WINAPI IsTimeZoneRedirectionEnabled(VOID)
Definition: time.c:26
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
BOOL WINAPI SetSystemTime(IN CONST SYSTEMTIME *lpSystemTime)
Definition: time.c:412
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
Definition: time.c:221
BOOL WINAPI DosDateTimeToFileTime(IN WORD wFatDate, IN WORD wFatTime, OUT LPFILETIME lpFileTime)
Definition: time.c:75
LONG WINAPI CompareFileTime(IN CONST FILETIME *lpFileTime1, IN CONST FILETIME *lpFileTime2)
Definition: time.c:106
BOOL WINAPI LocalFileTimeToFileTime(IN CONST FILETIME *lpLocalFileTime, OUT LPFILETIME lpFileTime)
Definition: time.c:253
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:286
BOOL WINAPI FileTimeToDosDateTime(IN CONST FILETIME *lpFileTime, OUT LPWORD lpFatDate, OUT LPWORD lpFatTime)
Definition: time.c:37
VOID WINAPI GetSystemTime(OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:327
VOID WINAPI GetSystemTimePreciseAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:148
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
Definition: dumpinfo.c:43
BOOLEAN RtlTimeToTimeFields(IN PLARGE_INTEGER Time, IN PTIME_FIELDS TimeFields)
BOOLEAN RtlTimeFieldsToTime(IN PTIME_FIELDS TimeFields, IN PLARGE_INTEGER Time)
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
@ SystemTimeAdjustmentInformation
Definition: ntddk_ex.h:39
@ SystemProcessorPerformanceInformation
Definition: ntddk_ex.h:19
unsigned short WORD
Definition: ntddk_ex.h:93
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define UInt32x32To64(a, b)
Definition: intsafe.h:252
#define STUB
Definition: kernel32.h:27
if(dx< 0)
Definition: linetemp.h:194
unsigned int ULONG
Definition: retypes.h:1
unsigned __int64 ULONG64
Definition: imports.h:198
#define SE_SYSTEMTIME_PRIVILEGE
Definition: security.c:666
static PTIME_FIELDS TimeFields
Definition: time.c:104
struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlAcquirePrivilege(_In_ PULONG Privilege, _In_ ULONG NumPriv, _In_ ULONG Flags, _Out_ PVOID *ReturnedState)
NTSYSAPI VOID NTAPI RtlReleasePrivilege(_In_ PVOID ReturnedState)
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
NTSTATUS NTAPI NtSetSystemTime(IN PLARGE_INTEGER SystemTime, OUT PLARGE_INTEGER PreviousTime OPTIONAL)
Definition: time.c:394
#define STATUS_INTERNAL_ERROR
Definition: ntstatus.h:465
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
#define CONST
Definition: pedump.c:81
#define BOOLEAN
Definition: pedump.c:73
DWORD * PDWORD
Definition: pedump.c:68
long LONG
Definition: pedump.c:60
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:166
#define YieldProcessor
Definition: ke.h:48
#define SharedUserData
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
KSYSTEM_TIME ktTermsrvClientBias
Definition: base.h:139
ULONG TermsrvClientTimeZoneId
Definition: base.h:140
SYSTEM_BASIC_INFORMATION SysInfo
Definition: base.h:130
LONG High1Time
Definition: ketypes.h:918
LONG High2Time
Definition: ketypes.h:919
ULONG LowPart
Definition: ketypes.h:917
USHORT Milliseconds
Definition: env_spec_w32.h:717
USHORT Weekday
Definition: env_spec_w32.h:718
$ULONG LowPart
Definition: ntbasedef.h:569
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
$ULONG HighPart
Definition: ntbasedef.h:570
uint16_t * LPWORD
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
char CCHAR
Definition: typedefs.h:51
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
LONGLONG QuadPart
Definition: typedefs.h:114
ULONG LowPart
Definition: typedefs.h:106
struct _LARGE_INTEGER::@2275 u
BOOL Privilege(LPTSTR pszPrivilege, BOOL bEnable)
Definition: user_lib.cpp:531
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
#define TIME_ZONE_ID_INVALID
Definition: winbase.h:286
BOOL * PBOOL
Definition: windef.h:161
#define WINAPI
Definition: msvc.h:6