28#define GET_PROC(func) \
29 p##func = (void *)GetProcAddress(hmod, #func);
71 win_skip(
"GetProductInfo() not available\n");
84 "got %d and 0x%x (expected TRUE and a valid PRODUCT_* value)\n",
res, product);
87 "got %d and 0x%x with 0x%x (expected FALSE and PRODUCT_UNDEFINED with LastError untouched)\n",
95 res = pGetProductInfo(6, 1, 0, 0,
NULL);
97 "got %d with 0x%x (expected FALSE with LastError untouched\n",
res,
GetLastError());
115 ok(!
ret,
"Expected GetVersionExA to fail\n");
118 "Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n",
124 ok(!
ret,
"Expected GetVersionExA to fail\n");
127 "Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n",
133 ok(!
ret,
"Expected GetVersionExA to fail\n");
136 "Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n",
142 ok(
ret,
"Expected GetVersionExA to succeed\n");
149 ok(
ret,
"GetVersionExA failed.\n");
160 SRCVERSION_CURRENT = 1,
161 SRCVERSION_INC_MINOR = 2,
162 SRCVERSION_INC_SP_MINOR = 3,
163 SRCVERSION_INC_SP_MAJOR = 4,
164 SRCVERSION_DEC_SP_MAJOR = 5,
165 SRCVERSION_DEC_MAJOR = 6,
166 SRCVERSION_INC_BUILD = 7,
167 SRCVERSION_REQUIRES_SP = 0x1000,
170 struct verify_version_test
186 } verify_version_tests[] =
190 SRCVERSION_INC_MINOR,
198 SRCVERSION_INC_MINOR,
222 SRCVERSION_INC_MINOR,
230 SRCVERSION_INC_MINOR,
238 SRCVERSION_INC_MINOR,
246 SRCVERSION_INC_SP_MINOR,
254 SRCVERSION_INC_SP_MINOR,
262 SRCVERSION_INC_SP_MAJOR,
270 SRCVERSION_INC_SP_MINOR,
278 SRCVERSION_INC_SP_MINOR,
286 SRCVERSION_INC_SP_MINOR,
295 SRCVERSION_INC_SP_MINOR,
304 SRCVERSION_INC_SP_MINOR,
314 SRCVERSION_INC_SP_MINOR,
324 SRCVERSION_INC_SP_MAJOR,
332 SRCVERSION_INC_SP_MAJOR,
340 SRCVERSION_INC_SP_MAJOR,
348 SRCVERSION_INC_SP_MAJOR,
356 SRCVERSION_INC_SP_MAJOR,
364 SRCVERSION_INC_SP_MAJOR,
373 SRCVERSION_INC_SP_MAJOR,
381 SRCVERSION_DEC_MAJOR,
397 SRCVERSION_INC_SP_MAJOR,
406 SRCVERSION_INC_SP_MAJOR,
415 SRCVERSION_INC_SP_MAJOR,
451 SRCVERSION_INC_SP_MINOR,
458 SRCVERSION_INC_SP_MAJOR,
465 SRCVERSION_INC_SP_MAJOR,
472 SRCVERSION_INC_SP_MAJOR,
479 SRCVERSION_INC_SP_MAJOR,
486 SRCVERSION_INC_MINOR,
493 SRCVERSION_INC_MINOR,
507 SRCVERSION_INC_BUILD,
514 SRCVERSION_INC_BUILD,
521 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
528 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
535 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
543 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
552 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
561 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
570 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
588 servicepack =
info.wServicePackMajor;
589 if (servicepack == 0)
590 skip(
"There is no ServicePack on this system. Some tests will be skipped.\n");
593 if (
info.dwMajorVersion == 6 &&
info.dwMinorVersion == 2)
597 ok(!pRtlGetVersion(&rtlinfo),
"RtlGetVersion failed\n");
601 win_skip(
"GetVersionEx and VerifyVersionInfo are faking values\n");
606 for (
i = 0;
i <
sizeof(verify_version_tests)/
sizeof(verify_version_tests[0]);
i++)
608 struct verify_version_test *
test = &verify_version_tests[
i];
612 if (servicepack == 0 && srcinfo & SRCVERSION_REQUIRES_SP)
614 srcinfo &= ~SRCVERSION_REQUIRES_SP;
616 info.dwOSVersionInfoSize =
sizeof(
info);
621 case SRCVERSION_ZERO:
624 case SRCVERSION_INC_MINOR:
625 info.dwMinorVersion++;
627 case SRCVERSION_INC_SP_MINOR:
628 info.wServicePackMinor++;
630 case SRCVERSION_INC_SP_MAJOR:
631 info.wServicePackMajor++;
633 case SRCVERSION_DEC_SP_MAJOR:
634 info.wServicePackMajor--;
636 case SRCVERSION_DEC_MAJOR:
637 info.dwMajorVersion--;
639 case SRCVERSION_INC_BUILD:
640 info.dwBuildNumber++;
667 info.dwMajorVersion = 3;
668 info.dwMinorVersion = 10;
674 info.dwMinorVersion = 0;
675 info.wServicePackMajor = 10;
681 info.wServicePackMajor = 0;
682 info.wServicePackMinor = 10;
691 info.dwOSVersionInfoSize = 0;
#define ERROR_INSUFFICIENT_BUFFER
NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
static const WCHAR version[]
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI VerifyVersionInfoA(IN LPOSVERSIONINFOEXA lpVersionInformation, IN DWORD dwTypeMask, IN DWORDLONG dwlConditionMask)
BOOL WINAPI GetVersionExA(IN LPOSVERSIONINFOA lpVersionInformation)
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 const SecPkgInfoA infoA
static PEXPLICIT_ACCESSW *static HMODULE hmod
static void init_function_pointers(void)
static void test_VerifyVersionInfo(void)
static void test_GetVersionEx(void)
static void test_GetProductInfo(void)
#define todo_wine_if(is_todo)
#define VER_SERVICEPACKMINOR
#define VER_GREATER_EQUAL
#define VER_SERVICEPACKMAJOR
#define PRODUCT_ENTERPRISE_S_N_EVALUATION
#define PRODUCT_UNDEFINED
ULONGLONG NTAPI VerSetConditionMask(IN ULONGLONG ConditionMask, IN ULONG TypeMask, IN UCHAR Condition)
ULONG dwOSVersionInfoSize
ULONG dwOSVersionInfoSize
DWORD WINAPI GetLastError(void)
#define ERROR_OLD_WIN_VERSION
struct _OSVERSIONINFOA OSVERSIONINFOA
struct _OSVERSIONINFOEXA OSVERSIONINFOEXA
struct _OSVERSIONINFOEXW RTL_OSVERSIONINFOEXW