22#define NONAMELESSUNION
41#define PROCESSOR_FEATURE_MAX 64
50#define MAX_WOW64_SHARED_ENTRIES 16
96} KSHARED_USER_DATA, *PKSHARED_USER_DATA;
100#define TICKSPERSEC 10000000
101#define TICKSPERMSEC 10000
102#define SECSPERDAY 86400
113 { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
114 { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
119 return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0);
133 pRtlTimeToTimeFields( &litime, &tfresult);
137 "#%d expected: %d-%d-%d %d:%d:%d got: %d-%d-%d %d:%d:%d\n", ++
i,
143 pRtlTimeFieldsToTime( &tfresult, &liresult);
144 ok( liresult.
QuadPart == litime.
QuadPart,
" TimeFieldsToTime failed on %d-%d-%d %d:%d:%d. Error is %d ticks\n",
150 pRtlTimeToTimeFields( &litime, &tfresult);
153 tfresult.
Day == 1 && tfresult.
Hour == 0 &&
155 "#%d expected: %d-%d-%d %d:%d:%d got: %d-%d-%d %d:%d:%d\n", ++
i,
161 pRtlTimeFieldsToTime( &tfresult, &liresult);
162 ok( liresult.
QuadPart == litime.
QuadPart,
" TimeFieldsToTime failed on %d-%d-%d %d:%d:%d. Error is %d ticks\n",
187 status = pNtQueryPerformanceCounter(&
counter, (
void *)0xdeadbee0);
205 if (!pRtlQueryTimeZoneInformation || !pRtlQueryDynamicTimeZoneInformation)
207 win_skip(
"Time zone name tests requires Vista or later\n");
211 memset(&tzinfo, 0,
sizeof(tzinfo));
212 status = pRtlQueryDynamicTimeZoneInformation(&tzinfo);
214 "RtlQueryDynamicTimeZoneInformation failed, got %08x\n",
status);
216 "standard time zone name isn't an indirect string, got %s\n",
219 "daylight time zone name isn't an indirect string, got %s\n",
222 memset(&tzinfo, 0,
sizeof(tzinfo));
225 "RtlQueryTimeZoneInformation failed, got %08x\n",
status);
227 "standard time zone name isn't an indirect string, got %s\n",
230 "daylight time zone name isn't an indirect string, got %s\n",
237 KSHARED_USER_DATA *user_shared_data = (
void *)0x7ffe0000;
241 if (!pNtGetTickCount)
243 win_skip(
"NtGetTickCount is not available\n");
247 for (
i = 0;
i < 5; ++
i)
249 diff = (user_shared_data->TickCountQuad * user_shared_data->TickCountMultiplier) >> 24;
250 diff = pNtGetTickCount() - diff;
251 ok(diff < 32,
"NtGetTickCount - TickCountQuad too high, expected < 32 got %d\n", diff);
262 pNtQueryPerformanceCounter = (
void *)
GetProcAddress(
mod,
"NtQueryPerformanceCounter");
264 pRtlQueryTimeZoneInformation =
266 pRtlQueryDynamicTimeZoneInformation =
269 if (pRtlTimeToTimeFields && pRtlTimeFieldsToTime)
272 win_skip(
"Required time conversion functions are not available\n");
std::map< E_MODULE, HMODULE > mod
#define GetProcAddress(x, y)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
enum _NT_PRODUCT_TYPE NT_PRODUCT_TYPE
enum _NT_PRODUCT_TYPE * PNT_PRODUCT_TYPE
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
static void test_NtQueryPerformanceCounter(void)
static void test_pRtlTimeToTimeFields(void)
static PLARGE_INTEGER Time
static LARGE_INTEGER * frequency
static TIME_FIELDS tftest
static void test_NtGetTickCount(void)
static const int MonthLengths[2][12]
static PTIME_FIELDS TimeFields
static void test_RtlQueryTimeZoneInformation(void)
#define STATUS_ACCESS_VIOLATION
BOOLEAN ProductTypeIsValid
volatile KSYSTEM_TIME SystemTime
ULONG TickCountLowDeprecated
NT_PRODUCT_TYPE NtProductType
union _KUSER_SHARED_DATA::@4126 DUMMYUNIONNAME
ULONGLONG TestRetInstruction
volatile ULONG ActiveConsoleId
BOOLEAN KdDebuggerEnabled
ULONG TickCountMultiplier
ULONG Wow64SharedInformation[MAX_WOW64_SHARED_ENTRIES]
BOOLEAN ProcessorFeatures[PROCESSOR_FEATURE_MAX]
ULONG LastSystemRITEventTickCount
ULONG NumberOfPhysicalPages
volatile ULONG64 TickCountQuad
volatile KSYSTEM_TIME TickCount
volatile KSYSTEM_TIME InterruptTime
LARGE_INTEGER SystemExpirationDate
ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture
volatile ULONG DismountCount
volatile KSYSTEM_TIME TimeZoneBias
ULONGLONG SystemCallPad[3]
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
#define PROCESSOR_FEATURE_MAX
struct _KSYSTEM_TIME KSYSTEM_TIME
#define MAX_WOW64_SHARED_ENTRIES
_ALTERNATIVE_ARCHITECTURE_TYPE
struct _KSYSTEM_TIME * PKSYSTEM_TIME
enum _ALTERNATIVE_ARCHITECTURE_TYPE ALTERNATIVE_ARCHITECTURE_TYPE