Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-15811

.NET WPF applications are broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.4.15
    • None
    • None

    Description

      Code (taken from WPF source code, MIT license):

      [SecurityCritical]
      [SuppressUnmanagedCodeSecurity]
      [DllImport(ExternDll.User32, EntryPoint="RegisterClassEx", CharSet=CharSet.Unicode, SetLastError=true, BestFitMapping=false)]
      internal static extern UInt16 IntRegisterClassEx(NativeMethods.WNDCLASSEX_D wc_d);        ///<SecurityNote>
              /// Critical - calls IntRegisterClassEx (the real PInvoke method)
              ///</SecurityNote>
              [SecurityCritical]
              internal static UInt16 RegisterClassEx(NativeMethods.WNDCLASSEX_D wc_d)
              {
                  UInt16 result = IntRegisterClassEx(wc_d);
                  if(result == 0)
                  {
                      throw new Win32Exception();
                  }
       
                  return result;
              }

      Exception:
      System.TypeInitializationException: The type initializer for 'System.Windows.Window' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.FrameworkElement' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Media.Transform' threw an exception. ---> System.ComponentModel.Win32Exception: ERROR_INVALID_PARAMETER - The parameter is incorrect at MS.Win32.UnsafeNativeMethods.RegisterClassEx(WNDCLASSEX_D wc_d) at MS.Win32.HwndWrapper..ctor(Int32 classStyle, Int32 style, Int32 exStyle, Int32 x, Int32 y, Int32 width, Int32 height, String name, IntPtr parent, HwndWrapperHook[] hooks) at System.Windows.Threading.Dispatcher..ctor() at System.Windows.Threading.Dispatcher.get_CurrentDispatcher() at System.Windows.Media.MatrixTransform..ctor(Matrix matrix) at System.Windows.Media.Transform.MakeIdentityTransform() at System.Windows.Media.Transform..cctor() — End of inner exception stack trace — at System.Windows.Media.Transform.get_Identity() at System.Windows.FrameworkElement..cctor() — End of inner exception stack trace — at System.Windows.Window..cctor() — End of inner exception stack trace — at System.Windows.Window..ctor() at TenEnv.TestTool.WpfTest..ctor() in D:\VSProjects\TenEnv\TenEnv.TestTool\WpfTest.xaml.cs:line 21 at TenEnv.TestTool.Test.Perform() in D:\VSProjects\TenEnv\TenEnv.TestTool\Tester.cs:line 20

      Tested on .NET Framework 4.0, works fine in Windows XP. Affects a lot of .NET programs which are using WPF controls.

      I'm newbie at testing/debugging ReactOS, exactly this .NET-stuff, so tell me how to improve my issue

       

      Attachments

        1. putty1.log
          56 kB
        2. ReactOS_Net_WPF_OK.png
          ReactOS_Net_WPF_OK.png
          95 kB
        3. ReactosNetTest.zip
          17 kB
        4. reactos-wpf-problem.png
          reactos-wpf-problem.png
          53 kB
        5. windows10-wpf.png
          windows10-wpf.png
          144 kB

        Activity

          People

            learn_more Mark Jansen
            Dz3n Dz3n
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: