-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Corecct ProcessInfo.operationSystemVersion on Windows #2041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corecct ProcessInfo.operationSystemVersion on Windows #2041
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't do this -- RtlGetVersion is a much more direct approach.
The usage here is not for compatibility but rather reporting purposes. I agree with @jakepetroules - we should just resort to |
If my understanding is correct, we can't use that approach. |
@yamoridon - no your understanding is not correct. The RtlFunctions are implemented in the kernel, but you can still use them in usermode. It just is a slightly roundabout way - you need to use |
@compnerd It's interesting. I try it. I think I can do it. Thank you! |
Thank you for advice. How about this? Too long line? |
Minor naming things, but looks good otherwise! |
@swift-ci please test |
Can you also please squash the changes? |
Does it mean following?
|
You can use |
7a755cb
to
97893d0
Compare
Seems to have succeeded. Thank you for your kind support! |
@swift-ci please test |
I think that this improves the Windows status quo, so I'm going to go ahead and merge this. If @millenomi has additional suggestions, they can be handled in a follow up. |
At Windows 8.1, Microsoft changed the default behavior of
GetVersionEx not to return actual version number for preventing
compatibility isseus. I think it's better to use the product version
retrived from kernel32.dll as an alternative as Microsoft described in
a document:
https://docs.microsoft.com/en-us/windows/desktop/SysInfo/getting-the-system-version