reactos/base/services/w32time/w32time.h
Eric Kohl 3d8d88eaf9 [W32TIME] Improve w32time setup
- Remove w32time from hivesys.inf
- Implement DllRegisterServer
- Add DllUnregisterServer stub
- Register w32time at the end of setup phase 2
2021-12-06 23:24:51 +01:00

48 lines
828 B
C

#ifndef _W32TIME_H
#define _W32TIME_H
#include <stdarg.h>
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include <winreg.h>
#include <winsvc.h>
#include <winuser.h>
#define MAX_VALUE_NAME 16383
#define NTPPORT 123
/* ntpclient.c */
// NTP timestamp
typedef struct _TIMEPACKET
{
DWORD dwInteger;
DWORD dwFractional;
} TIMEPACKET, *PTIMEPACKET;
// NTP packet
typedef struct _NTPPACKET
{
BYTE LiVnMode;
BYTE Stratum;
char Poll;
char Precision;
long RootDelay;
long RootDispersion;
char ReferenceID[4];
TIMEPACKET ReferenceTimestamp;
TIMEPACKET OriginateTimestamp;
TIMEPACKET ReceiveTimestamp;
TIMEPACKET TransmitTimestamp;
}NTPPACKET, *PNTPPACKET;
ULONG GetServerTime(LPWSTR lpAddress);
#endif /* _W32TIME_H */