AutoUpdater.NET icon indicating copy to clipboard operation
AutoUpdater.NET copied to clipboard

Unable to get the window handle for the 'WebBrowser' control. Windowless ActiveX controls are not supported.

Open DSPaul opened this issue 1 year ago • 1 comments

Just got the following crash log from a user:

System.Reflection.TargetInvocationException: Unable to get the window handle for the 'WebBrowser' control. Windowless ActiveX controls are not supported.
 ---> System.EntryPointNotFoundException: Unable to find an entry point named 'GetThreadDpiHostingBehavior' in DLL 'USER32.dll'.
   at System.Windows.Forms.ScaleHelper.DpiAwarenessScope..ctor(DPI_AWARENESS_CONTEXT context, DPI_HOSTING_BEHAVIOR behavior)
   at System.Windows.Forms.ScaleHelper.EnterDpiAwarenessScope(DPI_AWARENESS_CONTEXT awareness, DPI_HOSTING_BEHAVIOR dpiHosting)
   at System.Windows.Forms.Application.ThreadContext.GetParkingWindow(DPI_AWARENESS_CONTEXT context)
   at System.Windows.Forms.Application.ParkHandle(CreateParams cp, DPI_AWARENESS_CONTEXT dpiAwarenessContext)
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Control.get_Handle()
   at System.Windows.Forms.WebBrowserBase.DoVerb(OLEIVERB verb)
   at System.Windows.Forms.WebBrowserBase.TransitionFromRunningToInPlaceActive()
   --- End of inner exception stack trace ---
   at System.Windows.Forms.WebBrowserBase.TransitionFromRunningToInPlaceActive()
   at System.Windows.Forms.WebBrowserBase.TransitionUpTo(AXState state)
   at System.Windows.Forms.WebBrowser.get_AxIWebBrowser2()
   at System.Windows.Forms.WebBrowser.get_ScriptErrorsSuppressed()
   at System.Windows.Forms.WebBrowser.set_ScriptErrorsSuppressed(Boolean value)
   at AutoUpdaterDotNET.UpdateForm.InitializeComponent()
   at AutoUpdaterDotNET.UpdateForm..ctor(UpdateInfoEventArgs args)
   at AutoUpdaterDotNET.AutoUpdater.ShowUpdateForm(UpdateInfoEventArgs args)
   at AutoUpdaterDotNET.AutoUpdater.StartUpdate(Object result)
   at AutoUpdaterDotNET.AutoUpdater.<>c.<Start>b__48_1(Object _, RunWorkerCompletedEventArgs args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) 

I'm using version 1.9.2 I do not have a changelog link in my .xml file to avoid using the webbrowser as exceptions from the webbrowser control have caused me problems in the past.

DSPaul avatar Feb 16 '25 16:02 DSPaul

Update: the user in question reached out to me, he was trying to run my WPF application on Linux using bottles/wine so that explains a lot I think.

DSPaul avatar Feb 16 '25 16:02 DSPaul