Skip to content

Use RtlGetVersion for Windows version checks#4999

Closed
Allerek wants to merge 1 commit into
multitheftauto:masterfrom
Allerek:sharedutil-rtlgetversion
Closed

Use RtlGetVersion for Windows version checks#4999
Allerek wants to merge 1 commit into
multitheftauto:masterfrom
Allerek:sharedutil-rtlgetversion

Conversation

@Allerek

@Allerek Allerek commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the VerifyVersionInfoW-based Windows version check in SharedUtil::IsWindowsVersionOrGreater with RtlGetVersion.

This keeps the function aligned with its existing intent: return the real Windows version while ignoring compatibility mode shims.

VerifyVersionInfoW has also been deprecated by Microsoft all the way back in Windows 10.

Motivation

VerifyVersionInfoW can be affected by application compatibility/version manifest behavior, which can make OS version checks unreliable. RtlGetVersion returns the actual OS version from ntdll.dll, so this is a better fit for IsWindowsVersionOrGreater.

Test plan

Run on machines using Windows XP->Windows 7 SP-Whatever

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@Allerek

Allerek commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Same as #4998 due to active discussion on Discord.

@Allerek Allerek closed this Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant