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

Application Fails to Launch on Older Windows 10 Versions Due to Unsupported API #628

Open
nilaoda opened this issue Dec 13, 2024 · 0 comments · May be fixed by #629
Open

Application Fails to Launch on Older Windows 10 Versions Due to Unsupported API #628

nilaoda opened this issue Dec 13, 2024 · 0 comments · May be fixed by #629
Labels
bug Something isn't working

Comments

@nilaoda
Copy link

nilaoda commented Dec 13, 2024

Describe the bug

A clear and concise description of what the bug is and any steps to reproduce it. Sample code or a minimal repro is helpful.

Desktop/Platform

  • OS: Windows 10 10240, LTSC 2015
  • FluentAvalonia Version: 2.2.0
  • Avalonia Version: 11.2.1

Error Details

Application: Demo.exe  
CoreCLR Version: 9.0.0  
Description: The process was terminated due to an unhandled exception.  

Exception Info: System.EntryPointNotFoundException: Unable to find an entry point named 'AdjustWindowRectExForDpi' in native library 'user32.dll'.  
   at Internal.Runtime.CompilerHelpers.InteropHelpers.FixupMethodCell(IntPtr, InteropHelpers.MethodFixupCell*) + 0x15c  
   at Internal.Runtime.CompilerHelpers.InteropHelpers.ResolvePInvokeSlow(InteropHelpers.MethodFixupCell*) + 0x3d  
   at FluentAvalonia.Interop.Win32Interop.AdjustWindowRectExForDpi(RECT*, Int32, BOOL, Int32, Int32) + 0x2f  
   at FluentAvalonia.UI.Windowing.Win32WindowManager.HandleNCCALCSIZE(WPARAM, LPARAM) + 0x159  
   at FluentAvalonia.UI.Windowing.Win32WindowManager.WndProc(HWND, UInt32, WPARAM, LPARAM) + 0x21e  
   at FluentAvalonia.UI.Windowing.Win32WindowManager.WndProcStatic(IntPtr, UInt32, IntPtr, IntPtr) + 0x72  

Possible Cause:

  • The application calls the AdjustWindowRectExForDpi API, which is only available on newer Windows 10 version.
@nilaoda nilaoda added the bug Something isn't working label Dec 13, 2024
@nilaoda nilaoda linked a pull request Dec 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant