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