1 /* 2 * Unit test suite for version functions 3 * 4 * Copyright 2006 Robert Shearman 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 19 */ 20 21 #include "precomp.h" 22 23 static BOOL (WINAPI * pGetProductInfo)(DWORD, DWORD, DWORD, DWORD, DWORD *); 24 static BOOL (WINAPI * pVerifyVersionInfoA)(LPOSVERSIONINFOEXA, DWORD, DWORDLONG); 25 static ULONGLONG (WINAPI * pVerSetConditionMask)(ULONGLONG, DWORD, BYTE); 26 static NTSTATUS (WINAPI * pRtlGetVersion)(RTL_OSVERSIONINFOEXW *); 27 28 #define GET_PROC(func) \ 29 p##func = (void *)GetProcAddress(hmod, #func); 30 31 static void init_function_pointers(void) 32 { 33 HMODULE hmod; 34 35 hmod = GetModuleHandleA("kernel32.dll"); 36 37 GET_PROC(GetProductInfo); 38 GET_PROC(VerifyVersionInfoA); 39 GET_PROC(VerSetConditionMask); 40 41 hmod = GetModuleHandleA("ntdll.dll"); 42 43 GET_PROC(RtlGetVersion); 44 } 45 46 static void test_GetProductInfo(void) 47 { 48 DWORD product; 49 DWORD res; 50 DWORD table[] = {9,8,7,6, 51 7,0,0,0, 52 6,2,0,0, 53 6,1,2,0, 54 6,1,1,0, 55 6,1,0,2, 56 6,1,0,0, 57 6,0,3,0, 58 6,0,2,0, 59 6,0,1,5, 60 6,0,1,0, 61 6,0,0,0, 62 5,3,0,0, 63 5,2,0,0, 64 5,1,0,0, 65 5,0,0,0, 66 0}; 67 68 DWORD *entry = table; 69 70 if (!pGetProductInfo) 71 { 72 /* Not present before Vista */ 73 win_skip("GetProductInfo() not available\n"); 74 return; 75 } 76 77 while (*entry) 78 { 79 /* SetLastError() / GetLastError(): value is untouched */ 80 product = 0xdeadbeef; 81 SetLastError(0xdeadbeef); 82 res = pGetProductInfo(entry[0], entry[1], entry[2], entry[3], &product); 83 84 if (entry[0] >= 6) 85 ok(res && (product > PRODUCT_UNDEFINED) && (product <= PRODUCT_PROFESSIONAL_WMC), 86 "got %d and 0x%x (expected TRUE and a valid PRODUCT_* value)\n", res, product); 87 else 88 ok(!res && !product && (GetLastError() == 0xdeadbeef), 89 "got %d and 0x%x with 0x%x (expected FALSE and PRODUCT_UNDEFINED with LastError untouched)\n", 90 res, product, GetLastError()); 91 92 entry+= 4; 93 } 94 95 /* NULL pointer is not a problem */ 96 SetLastError(0xdeadbeef); 97 res = pGetProductInfo(6, 1, 0, 0, NULL); 98 ok( (!res) && (GetLastError() == 0xdeadbeef), 99 "got %d with 0x%x (expected FALSE with LastError untouched\n", res, GetLastError()); 100 } 101 102 static void test_GetVersionEx(void) 103 { 104 OSVERSIONINFOA infoA; 105 OSVERSIONINFOEXA infoExA; 106 BOOL ret; 107 108 if (0) 109 { 110 /* Silently crashes on XP */ 111 GetVersionExA(NULL); 112 } 113 114 SetLastError(0xdeadbeef); 115 memset(&infoA,0,sizeof infoA); 116 ret = GetVersionExA(&infoA); 117 ok(!ret, "Expected GetVersionExA to fail\n"); 118 ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER || 119 GetLastError() == 0xdeadbeef /* Win9x */, 120 "Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n", 121 GetLastError()); 122 123 SetLastError(0xdeadbeef); 124 infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) / 2; 125 ret = GetVersionExA(&infoA); 126 ok(!ret, "Expected GetVersionExA to fail\n"); 127 ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER || 128 GetLastError() == 0xdeadbeef /* Win9x */, 129 "Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n", 130 GetLastError()); 131 132 SetLastError(0xdeadbeef); 133 infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) * 2; 134 ret = GetVersionExA(&infoA); 135 ok(!ret, "Expected GetVersionExA to fail\n"); 136 ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER || 137 GetLastError() == 0xdeadbeef /* Win9x */, 138 "Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n", 139 GetLastError()); 140 141 SetLastError(0xdeadbeef); 142 infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA); 143 ret = GetVersionExA(&infoA); 144 ok(ret, "Expected GetVersionExA to succeed\n"); 145 ok(GetLastError() == 0xdeadbeef, 146 "Expected 0xdeadbeef, got %d\n", GetLastError()); 147 148 SetLastError(0xdeadbeef); 149 infoExA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 150 ret = GetVersionExA((OSVERSIONINFOA *)&infoExA); 151 ok(ret || 152 broken(ret == 0), /* win95 */ 153 "Expected GetVersionExA to succeed\n"); 154 155 if (!infoExA.wServicePackMajor && !infoExA.wServicePackMinor) 156 ok(!infoExA.szCSDVersion[0], "got '%s'\n", infoExA.szCSDVersion); 157 } 158 159 static void test_VerifyVersionInfo(void) 160 { 161 OSVERSIONINFOEXA info; 162 BOOL ret; 163 DWORD servicepack, error; 164 165 if(!pVerifyVersionInfoA || !pVerSetConditionMask) 166 { 167 win_skip("Needed functions not available\n"); 168 return; 169 } 170 171 /* Before we start doing some tests we should check what the version of 172 * the ServicePack is. Tests on a box with no ServicePack will fail otherwise. 173 */ 174 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 175 GetVersionExA((OSVERSIONINFOA *)&info); 176 servicepack = info.wServicePackMajor; 177 178 /* Win8.1+ returns Win8 version in GetVersionEx when there's no app manifest targeting 8.1 */ 179 if (info.dwMajorVersion == 6 && info.dwMinorVersion == 2) 180 { 181 RTL_OSVERSIONINFOEXW rtlinfo; 182 rtlinfo.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW); 183 ok(SUCCEEDED(pRtlGetVersion(&rtlinfo)), "RtlGetVersion failed\n"); 184 185 if (rtlinfo.dwMajorVersion != 6 || rtlinfo.dwMinorVersion != 2) 186 { 187 win_skip("GetVersionEx and VerifyVersionInfo are faking values\n"); 188 return; 189 } 190 } 191 192 memset(&info, 0, sizeof(info)); 193 194 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION, 195 pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL)); 196 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 197 198 SetLastError(0xdeadbeef); 199 ret = pVerifyVersionInfoA(&info, VER_BUILDNUMBER | VER_MAJORVERSION | 200 VER_MINORVERSION/* | VER_PLATFORMID | VER_SERVICEPACKMAJOR | 201 VER_SERVICEPACKMINOR | VER_SUITENAME | VER_PRODUCT_TYPE */, 202 pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL)); 203 error = GetLastError(); 204 ok(!ret, "VerifyVersionInfoA succeeded\n"); 205 ok(error == ERROR_OLD_WIN_VERSION, 206 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 207 208 /* tests special handling of VER_SUITENAME */ 209 210 ret = pVerifyVersionInfoA(&info, VER_SUITENAME, 211 pVerSetConditionMask(0, VER_SUITENAME, VER_AND)); 212 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 213 214 ret = pVerifyVersionInfoA(&info, VER_SUITENAME, 215 pVerSetConditionMask(0, VER_SUITENAME, VER_OR)); 216 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 217 218 /* test handling of version numbers */ 219 220 /* v3.10 is always less than v4.x even 221 * if the minor version is tested */ 222 info.dwMajorVersion = 3; 223 info.dwMinorVersion = 10; 224 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 225 pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL), 226 VER_MAJORVERSION, VER_GREATER_EQUAL)); 227 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 228 229 info.dwMinorVersion = 0; 230 info.wServicePackMajor = 10; 231 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 232 pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL), 233 VER_MAJORVERSION, VER_GREATER_EQUAL)); 234 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 235 236 info.wServicePackMajor = 0; 237 info.wServicePackMinor = 10; 238 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 239 pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL), 240 VER_MAJORVERSION, VER_GREATER_EQUAL)); 241 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 242 243 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 244 GetVersionExA((OSVERSIONINFOA *)&info); 245 info.wServicePackMinor++; 246 SetLastError(0xdeadbeef); 247 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 248 pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); 249 error = GetLastError(); 250 ok(!ret, "VerifyVersionInfoA succeeded\n"); 251 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some wink2 */, 252 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 253 254 if (servicepack == 0) 255 { 256 skip("There is no ServicePack on this system\n"); 257 } 258 else 259 { 260 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 261 GetVersionExA((OSVERSIONINFOA *)&info); 262 info.wServicePackMajor--; 263 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 264 pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER)); 265 ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 266 267 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 268 GetVersionExA((OSVERSIONINFOA *)&info); 269 info.wServicePackMajor--; 270 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 271 pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); 272 ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 273 } 274 275 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 276 GetVersionExA((OSVERSIONINFOA *)&info); 277 info.wServicePackMajor++; 278 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 279 pVerSetConditionMask(0, VER_MINORVERSION, VER_LESS)); 280 ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 281 282 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 283 GetVersionExA((OSVERSIONINFOA *)&info); 284 info.wServicePackMajor++; 285 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 286 pVerSetConditionMask(0, VER_MINORVERSION, VER_LESS_EQUAL)); 287 ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 288 289 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 290 GetVersionExA((OSVERSIONINFOA *)&info); 291 info.wServicePackMajor--; 292 SetLastError(0xdeadbeef); 293 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 294 pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL)); 295 error = GetLastError(); 296 ok(!ret, "VerifyVersionInfoA succeeded\n"); 297 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 298 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 299 300 /* test the failure hierarchy for the four version fields */ 301 302 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 303 GetVersionExA((OSVERSIONINFOA *)&info); 304 info.wServicePackMajor++; 305 SetLastError(0xdeadbeef); 306 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 307 pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); 308 error = GetLastError(); 309 ok(!ret, "VerifyVersionInfoA succeeded\n"); 310 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 311 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 312 313 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 314 GetVersionExA((OSVERSIONINFOA *)&info); 315 info.dwMinorVersion++; 316 SetLastError(0xdeadbeef); 317 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 318 pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); 319 error = GetLastError(); 320 ok(!ret, "VerifyVersionInfoA succeeded\n"); 321 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 322 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 323 324 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 325 GetVersionExA((OSVERSIONINFOA *)&info); 326 info.dwMajorVersion++; 327 SetLastError(0xdeadbeef); 328 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 329 pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); 330 error = GetLastError(); 331 ok(!ret, "VerifyVersionInfoA succeeded\n"); 332 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 333 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 334 335 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 336 pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); 337 ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 338 339 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 340 GetVersionExA((OSVERSIONINFOA *)&info); 341 info.dwBuildNumber++; 342 SetLastError(0xdeadbeef); 343 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 344 pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); 345 error = GetLastError(); 346 ok(!ret, "VerifyVersionInfoA succeeded\n"); 347 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 348 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 349 350 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 351 pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); 352 ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 353 354 /* systematically test behaviour of condition mask (tests sorted by condition mask value) */ 355 356 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 357 GetVersionExA((OSVERSIONINFOA *)&info); 358 info.dwMinorVersion++; 359 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 360 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_MINORVERSION, VER_LESS)); 361 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 362 363 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 364 GetVersionExA((OSVERSIONINFOA *)&info); 365 info.dwMinorVersion++; 366 SetLastError(0xdeadbeef); 367 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 368 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_LESS)); 369 error = GetLastError(); 370 ok(!ret, "VerifyVersionInfoA succeeded\n"); 371 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 372 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 373 374 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 375 GetVersionExA((OSVERSIONINFOA *)&info); 376 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 377 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_LESS)); 378 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 379 380 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 381 GetVersionExA((OSVERSIONINFOA *)&info); 382 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 383 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_AND)); 384 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 385 386 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 387 GetVersionExA((OSVERSIONINFOA *)&info); 388 info.dwMinorVersion++; 389 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 390 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_LESS_EQUAL), VER_MINORVERSION, VER_LESS)); 391 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 392 393 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 394 GetVersionExA((OSVERSIONINFOA *)&info); 395 info.dwMinorVersion++; 396 SetLastError(0xdeadbeef); 397 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 398 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_AND), VER_MINORVERSION, VER_LESS)); 399 error = GetLastError(); 400 ok(!ret, "VerifyVersionInfoA succeeded\n"); 401 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 402 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 403 404 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 405 GetVersionExA((OSVERSIONINFOA *)&info); 406 info.dwMinorVersion++; 407 SetLastError(0xdeadbeef); 408 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 409 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_OR), VER_MINORVERSION, VER_LESS)); 410 error = GetLastError(); 411 ok(!ret, "VerifyVersionInfoA succeeded\n"); 412 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 413 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 414 415 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 416 GetVersionExA((OSVERSIONINFOA *)&info); 417 info.wServicePackMinor++; 418 SetLastError(0xdeadbeef); 419 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 420 pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS)); 421 error = GetLastError(); 422 ok(!ret, "VerifyVersionInfoA succeeded\n"); 423 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 424 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 425 426 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 427 GetVersionExA((OSVERSIONINFOA *)&info); 428 info.wServicePackMinor++; 429 SetLastError(0xdeadbeef); 430 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 431 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS)); 432 error = GetLastError(); 433 ok(!ret, "VerifyVersionInfoA succeeded\n"); 434 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 435 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 436 437 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 438 GetVersionExA((OSVERSIONINFOA *)&info); 439 info.wServicePackMajor++; 440 SetLastError(0xdeadbeef); 441 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 442 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL)); 443 error = GetLastError(); 444 ok(!ret, "VerifyVersionInfoA succeeded\n"); 445 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 446 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 447 448 if (servicepack) 449 { 450 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 451 GetVersionExA((OSVERSIONINFOA *)&info); 452 info.dwMajorVersion++; 453 info.wServicePackMajor--; 454 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 455 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_LESS), VER_SERVICEPACKMAJOR, VER_EQUAL)); 456 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 457 } 458 459 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 460 GetVersionExA((OSVERSIONINFOA *)&info); 461 info.wServicePackMinor++; 462 ret = pVerifyVersionInfoA(&info, VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 463 pVerSetConditionMask(pVerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS)); 464 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 465 466 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 467 GetVersionExA((OSVERSIONINFOA *)&info); 468 info.wServicePackMinor++; 469 SetLastError(0xdeadbeef); 470 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 471 pVerSetConditionMask(pVerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS)); 472 error = GetLastError(); 473 ok(!ret, "VerifyVersionInfoA succeeded\n"); 474 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 475 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 476 477 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 478 GetVersionExA((OSVERSIONINFOA *)&info); 479 info.wServicePackMinor++; 480 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 481 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), 482 VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS)); 483 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 484 485 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 486 GetVersionExA((OSVERSIONINFOA *)&info); 487 info.wServicePackMinor++; 488 SetLastError(0xdeadbeef); 489 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 490 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), 491 VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS)); 492 error = GetLastError(); 493 ok(!ret, "VerifyVersionInfoA succeeded\n"); 494 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 495 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 496 497 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 498 GetVersionExA((OSVERSIONINFOA *)&info); 499 info.wServicePackMinor++; 500 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 501 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), 502 VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS)); 503 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 504 505 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 506 GetVersionExA((OSVERSIONINFOA *)&info); 507 info.wServicePackMinor++; 508 SetLastError(0xdeadbeef); 509 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 510 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), 511 VER_MINORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS)); 512 error = GetLastError(); 513 ok(!ret, "VerifyVersionInfoA succeeded\n"); 514 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 515 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 516 517 if (servicepack) 518 { 519 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 520 GetVersionExA((OSVERSIONINFOA *)&info); 521 info.wServicePackMajor--; 522 SetLastError(0xdeadbeef); 523 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 524 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER)); 525 error = GetLastError(); 526 ok(!ret, "VerifyVersionInfoA succeeded\n"); 527 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 528 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 529 530 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 531 GetVersionExA((OSVERSIONINFOA *)&info); 532 info.wServicePackMajor--; 533 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 534 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), 535 VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER)); 536 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 537 538 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 539 GetVersionExA((OSVERSIONINFOA *)&info); 540 info.wServicePackMajor--; 541 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 542 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), 543 VER_MINORVERSION, VER_LESS_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER)); 544 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 545 546 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 547 GetVersionExA((OSVERSIONINFOA *)&info); 548 info.wServicePackMajor--; 549 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 550 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), 551 VER_MINORVERSION, VER_AND), VER_SERVICEPACKMAJOR, VER_GREATER)); 552 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 553 } 554 555 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 556 GetVersionExA((OSVERSIONINFOA *)&info); 557 info.wServicePackMajor++; 558 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 559 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_LESS_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER)); 560 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 561 562 if (servicepack) 563 { 564 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 565 GetVersionExA((OSVERSIONINFOA *)&info); 566 info.wServicePackMajor--; 567 SetLastError(0xdeadbeef); 568 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 569 pVerSetConditionMask(pVerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_GREATER), VER_SERVICEPACKMINOR, VER_EQUAL)); 570 error = GetLastError(); 571 ok(!ret, "VerifyVersionInfoA succeeded\n"); 572 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 573 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 574 } 575 576 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 577 GetVersionExA((OSVERSIONINFOA *)&info); 578 info.wServicePackMajor++; 579 ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 580 pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 581 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 582 583 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 584 GetVersionExA((OSVERSIONINFOA *)&info); 585 info.wServicePackMajor++; 586 SetLastError(0xdeadbeef); 587 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 588 pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 589 error = GetLastError(); 590 ok(!ret, "VerifyVersionInfoA succeeded\n"); 591 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 592 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 593 594 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 595 GetVersionExA((OSVERSIONINFOA *)&info); 596 info.wServicePackMajor++; 597 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 598 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 599 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 600 601 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 602 GetVersionExA((OSVERSIONINFOA *)&info); 603 info.wServicePackMajor++; 604 SetLastError(0xdeadbeef); 605 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 606 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 607 error = GetLastError(); 608 ok(!ret, "VerifyVersionInfoA succeeded\n"); 609 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 610 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 611 612 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 613 GetVersionExA((OSVERSIONINFOA *)&info); 614 info.wServicePackMajor++; 615 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 616 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), 617 VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 618 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 619 620 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 621 GetVersionExA((OSVERSIONINFOA *)&info); 622 info.wServicePackMajor++; 623 SetLastError(0xdeadbeef); 624 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 625 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 626 error = GetLastError(); 627 ok(!ret, "VerifyVersionInfoA succeeded\n"); 628 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 629 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 630 631 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 632 GetVersionExA((OSVERSIONINFOA *)&info); 633 info.dwMajorVersion--; 634 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 635 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 636 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 637 638 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 639 GetVersionExA((OSVERSIONINFOA *)&info); 640 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 641 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 642 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 643 644 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 645 GetVersionExA((OSVERSIONINFOA *)&info); 646 info.wServicePackMajor++; 647 SetLastError(0xdeadbeef); 648 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 649 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 650 error = GetLastError(); 651 ok(!ret, "VerifyVersionInfoA succeeded\n"); 652 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 653 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 654 655 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 656 GetVersionExA((OSVERSIONINFOA *)&info); 657 info.wServicePackMajor++; 658 SetLastError(0xdeadbeef); 659 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 660 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), 661 VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS)); 662 error = GetLastError(); 663 ok(!ret, "VerifyVersionInfoA succeeded\n"); 664 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 665 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 666 667 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 668 GetVersionExA((OSVERSIONINFOA *)&info); 669 info.wServicePackMajor++; 670 SetLastError(0xdeadbeef); 671 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 672 pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), 673 VER_MINORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS_EQUAL)); 674 error = GetLastError(); 675 ok(!ret, "VerifyVersionInfoA succeeded\n"); 676 ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, 677 "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); 678 679 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 680 GetVersionExA((OSVERSIONINFOA *)&info); 681 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 682 pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_AND)); 683 ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 684 685 /* test bad dwOSVersionInfoSize */ 686 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); 687 GetVersionExA((OSVERSIONINFOA *)&info); 688 info.dwOSVersionInfoSize = 0; 689 ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, 690 pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL)); 691 ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); 692 } 693 694 START_TEST(version) 695 { 696 init_function_pointers(); 697 698 test_GetProductInfo(); 699 test_GetVersionEx(); 700 test_VerifyVersionInfo(); 701 } 702