156{
157 enum srcversion_mode
158 {
159 SRCVERSION_ZERO = 0,
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,
168 };
169
170 struct verify_version_test
171 {
175
184
186 } verify_version_tests[] =
187 {
188 {
190 SRCVERSION_INC_MINOR,
191 0,
192
195 },
196 {
198 SRCVERSION_INC_MINOR,
200
203 },
204 {
206 SRCVERSION_CURRENT,
207 0,
208
211 },
212 {
214 SRCVERSION_CURRENT,
215 0,
216
219 },
220 {
222 SRCVERSION_INC_MINOR,
223 0,
224
227 },
228 {
230 SRCVERSION_INC_MINOR,
232
235 },
236 {
238 SRCVERSION_INC_MINOR,
240
243 },
244 {
246 SRCVERSION_INC_SP_MINOR,
248
251 },
252 {
254 SRCVERSION_INC_SP_MINOR,
256
259 },
260 {
262 SRCVERSION_INC_SP_MAJOR,
264
267 },
268 {
270 SRCVERSION_INC_SP_MINOR,
271 0,
272
275 },
276 {
278 SRCVERSION_INC_SP_MINOR,
280
283 },
284 {
286 SRCVERSION_INC_SP_MINOR,
287 0,
288
292 },
293 {
295 SRCVERSION_INC_SP_MINOR,
297
301 },
302 {
304 SRCVERSION_INC_SP_MINOR,
305 0,
306
311 },
312 {
314 SRCVERSION_INC_SP_MINOR,
316
321 },
322 {
324 SRCVERSION_INC_SP_MAJOR,
325 0,
326
329 },
330 {
332 SRCVERSION_INC_SP_MAJOR,
334
337 },
338 {
340 SRCVERSION_INC_SP_MAJOR,
342
345 },
346 {
348 SRCVERSION_INC_SP_MAJOR,
349 0,
350
353 },
354 {
356 SRCVERSION_INC_SP_MAJOR,
358
361 },
362 {
364 SRCVERSION_INC_SP_MAJOR,
365 0,
366
370 },
371 {
373 SRCVERSION_INC_SP_MAJOR,
375
378 },
379 {
381 SRCVERSION_DEC_MAJOR,
382 0,
383
386 },
387 {
389 SRCVERSION_CURRENT,
390 0,
391
394 },
395 {
397 SRCVERSION_INC_SP_MAJOR,
399
403 },
404 {
406 SRCVERSION_INC_SP_MAJOR,
408
412 },
413 {
415 SRCVERSION_INC_SP_MAJOR,
417
420 },
421 {
423 SRCVERSION_ZERO,
424 0,
425
427 },
428 {
430 SRCVERSION_ZERO,
432
434 },
435 {
437 SRCVERSION_ZERO,
438 0,
439
441 },
442 {
444 SRCVERSION_ZERO,
445 0,
446
448 },
449 {
451 SRCVERSION_INC_SP_MINOR,
453
455 },
456 {
458 SRCVERSION_INC_SP_MAJOR,
459 0,
460
462 },
463 {
465 SRCVERSION_INC_SP_MAJOR,
466 0,
467
469 },
470 {
472 SRCVERSION_INC_SP_MAJOR,
474
476 },
477 {
479 SRCVERSION_INC_SP_MAJOR,
481
483 },
484 {
486 SRCVERSION_INC_MINOR,
488
490 },
491 {
493 SRCVERSION_INC_MINOR,
495
497 },
498 {
500 SRCVERSION_CURRENT,
501 0,
502
504 },
505 {
507 SRCVERSION_INC_BUILD,
509
511 },
512 {
514 SRCVERSION_INC_BUILD,
515 0,
516
518 },
519 {
521 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
522 0,
523
525 },
526 {
528 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
529 0,
530
532 },
533 {
535 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
537
540 },
541 {
543 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
544 0,
545
549 },
550 {
552 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
553 0,
554
558 },
559 {
561 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
562 0,
563
567 },
568 {
570 SRCVERSION_DEC_SP_MAJOR | SRCVERSION_REQUIRES_SP,
572
575 },
576 };
577
582
583
584
585
588 servicepack =
info.wServicePackMajor;
589 if (servicepack == 0)
590 skip(
"There is no ServicePack on this system. Some tests will be skipped.\n");
591
592
593 if (
info.dwMajorVersion == 6 &&
info.dwMinorVersion == 2)
594 {
597 ok(!pRtlGetVersion(&rtlinfo),
"RtlGetVersion failed\n");
598
600 {
601 win_skip(
"GetVersionEx and VerifyVersionInfo are faking values\n");
602 return;
603 }
604 }
605
606 for (
i = 0;
i <
sizeof(verify_version_tests)/
sizeof(verify_version_tests[0]);
i++)
607 {
608 struct verify_version_test *
test = &verify_version_tests[
i];
611
612 if (servicepack == 0 && srcinfo & SRCVERSION_REQUIRES_SP)
613 continue;
614 srcinfo &= ~SRCVERSION_REQUIRES_SP;
615
616 info.dwOSVersionInfoSize =
sizeof(
info);
618
619 switch (srcinfo)
620 {
621 case SRCVERSION_ZERO:
623 break;
624 case SRCVERSION_INC_MINOR:
625 info.dwMinorVersion++;
626 break;
627 case SRCVERSION_INC_SP_MINOR:
628 info.wServicePackMinor++;
629 break;
630 case SRCVERSION_INC_SP_MAJOR:
631 info.wServicePackMajor++;
632 break;
633 case SRCVERSION_DEC_SP_MAJOR:
634 info.wServicePackMajor--;
635 break;
636 case SRCVERSION_DEC_MAJOR:
637 info.dwMajorVersion--;
638 break;
639 case SRCVERSION_INC_BUILD:
640 info.dwBuildNumber++;
641 break;
642 default:
643 ;
644 }
645
653
657 {
661 }
662 }
663
664
665
666
667 info.dwMajorVersion = 3;
668 info.dwMinorVersion = 10;
673
674 info.dwMinorVersion = 0;
675 info.wServicePackMajor = 10;
680
681 info.wServicePackMajor = 0;
682 info.wServicePackMinor = 10;
687
688
691 info.dwOSVersionInfoSize = 0;
695}
BOOL WINAPI VerifyVersionInfoA(IN LPOSVERSIONINFOEXA lpVersionInformation, IN DWORD dwTypeMask, IN DWORDLONG dwlConditionMask)
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
#define todo_wine_if(is_todo)
#define VER_SERVICEPACKMINOR
#define VER_GREATER_EQUAL
#define VER_SERVICEPACKMAJOR
ULONGLONG NTAPI VerSetConditionMask(IN ULONGLONG ConditionMask, IN ULONG TypeMask, IN UCHAR Condition)
ULONG dwOSVersionInfoSize
#define ERROR_OLD_WIN_VERSION
struct _OSVERSIONINFOEXW RTL_OSVERSIONINFOEXW