Skip to content
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

Fix for #7284 #15734

Merged

Conversation

yusupovdanil
Copy link
Contributor

@yusupovdanil yusupovdanil commented May 15, 2024

What does the pull request do?

Fixes #7284
Comparing windows version with Windows8_1 instead of Windows8.
The crash occurs because the Windows Server 2012 version is 6.2.9200, which is greater than 6.2, and comparing it with version 6.2 is incorrect. The function GetDpiForMonitor is only supported from Windows Server 2012 R2 (version 6.3).

What is the current behavior?

The application crashes on Windows Server 2012.

What is the updated/expected behavior with this PR?

Run application on Windows Server 2012 (version 6.2.9200), it should not crash on window creating.

Fixed issues

Fixes #7284

Comparing WindowVersion with Windows8_1 instead of Windows8
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0048479-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented May 15, 2024

  • All contributors have signed the CLA.

@yusupovdanil
Copy link
Contributor Author

@cla-avalonia agree

@maxkatz6 maxkatz6 added bug os-windows backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels May 16, 2024
Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@maxkatz6 maxkatz6 added this pull request to the merge queue May 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 16, 2024
@maxkatz6 maxkatz6 enabled auto-merge May 20, 2024 11:08
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0048525-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue May 20, 2024
Merged via the queue into AvaloniaUI:master with commit 1b27bf7 May 20, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch bug os-windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EntryPointNotFoundException: Unable to find an entry point named 'GetDpiForMonitor' in DLL 'shcore.dll'.
4 participants