Unable to find an entry point named 'GetThreadDpiHostingBehavior' in DLL 'USER32.dll'.

Questions about Wine on Linux
Locked
SSUPII
Newbie
Newbie
Posts: 3
Joined: Tue Apr 05, 2022 3:48 am

Unable to find an entry point named 'GetThreadDpiHostingBehavior' in DLL 'USER32.dll'.

Post by SSUPII »

PKHeX is a general save editor for all mainline Pokemon videogames. The latest update now requires .NET 8.0 to be installed.

With the dependency installed, I get this .NET exception:

Code: Select all

Unhandled exception. System.EntryPointNotFoundException: Unable to find an entry point named 'GetThreadDpiHostingBehavior' in DLL 'USER32.dll'.
   at System.Windows.Forms.DpiHelper.DpiAwarenessScope..ctor(DPI_AWARENESS_CONTEXT context, DPI_HOSTING_BEHAVIOR behavior)
   at System.Windows.Forms.DpiHelper.EnterDpiAwarenessScope(DPI_AWARENESS_CONTEXT awareness, DPI_HOSTING_BEHAVIOR dpiHosting)
   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Application.ThreadContext.get_MarshalingControl()
   at System.Windows.Forms.WindowsFormsSynchronizationContext..ctor()
   at System.Windows.Forms.WindowsFormsSynchronizationContext.InstallIfNeeded()
   at System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext)
   at System.Windows.Forms.ScrollableControl..ctor()
   at System.Windows.Forms.ContainerControl..ctor()
   at System.Windows.Forms.Form..ctor()
   at PKHeX.WinForms.Program.Main()
wine: Unhandled exception 0xe0434352 in thread 1a0 at address 00006FFFFFC53527 (thread 01a0), starting debugger...
Fatal error. Internal CLR error. (0x80131506)
   at System.Windows.Forms.DpiHelper+DpiAwarenessScope..ctor(Windows.Win32.UI.HiDpi.DPI_AWARENESS_CONTEXT, Windows.Win32.UI.HiDpi.DPI_HOSTING_BEHAVIOR)
   at System.Windows.Forms.DpiHelper.EnterDpiAwarenessScope(Windows.Win32.UI.HiDpi.DPI_AWARENESS_CONTEXT, Windows.Win32.UI.HiDpi.DPI_HOSTING_BEHAVIOR)
   at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams)
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Application+ThreadContext.get_MarshalingControl()
   at System.Windows.Forms.WindowsFormsSynchronizationContext..ctor()
   at System.Windows.Forms.WindowsFormsSynchronizationContext.InstallIfNeeded()
   at System.Windows.Forms.Control..ctor(Boolean)
   at System.Windows.Forms.ScrollableControl..ctor()
   at System.Windows.Forms.ContainerControl..ctor()
   at System.Windows.Forms.Form..ctor()
   at PKHeX.WinForms.Program.Main()
Monitored process exited.
Wine 8.21 is being used, starting from a fresh 64 bit prefix.
jkfloris
Level 12
Level 12
Posts: 3154
Joined: Thu Aug 14, 2014 10:10 am

Re: Unable to find an entry point named 'GetThreadDpiHostingBehavior' in DLL 'USER32.dll'.

Post by jkfloris »

Looks like bug 55892
TL;DR: Update to Wine version 9.0-rc1 or later
Locked