xref: /reactos/base/services/w32time/w32time.h (revision 0f92924a)
1 #ifndef _W32TIME_H
2 #define _W32TIME_H
3 
4 #include <stdarg.h>
5 
6 #define _INC_WINDOWS
7 #define COM_NO_WINDOWS_H
8 #define WIN32_NO_STATUS
9 
10 #include <windef.h>
11 #include <winbase.h>
12 #include <winnls.h>
13 #include <winreg.h>
14 #include <winsvc.h>
15 
16 #define MAX_VALUE_NAME 16383
17 #define NTPPORT 123
18 
19 
20 /* ntpclient.c */
21 // NTP timestamp
22 typedef struct _TIMEPACKET
23 {
24   DWORD dwInteger;
25   DWORD dwFractional;
26 } TIMEPACKET, *PTIMEPACKET;
27 
28 // NTP packet
29 typedef struct _NTPPACKET
30 {
31   BYTE LiVnMode;
32   BYTE Stratum;
33   char Poll;
34   char Precision;
35   long RootDelay;
36   long RootDispersion;
37   char ReferenceID[4];
38   TIMEPACKET ReferenceTimestamp;
39   TIMEPACKET OriginateTimestamp;
40   TIMEPACKET ReceiveTimestamp;
41   TIMEPACKET TransmitTimestamp;
42 }NTPPACKET, *PNTPPACKET;
43 
44 ULONG GetServerTime(LPWSTR lpAddress);
45 
46 #endif /* _W32TIME_H */
47