MScholtes / VirtualDesktop

C# command line tool to manage virtual desktops in Windows 10
MIT License
606 stars 60 forks source link

Wrapper fails after update from Win11 21H2 to 22H2 #45

Closed armbrusterc closed 2 years ago

armbrusterc commented 2 years ago

With User privs:

C:\Users\USERNAME\AppData\Local\VirtualDesktopWrapper>VirtualDesktop11-21H2.exe /LIST

Unhandled Exception: System.Runtime.InteropServices.COMException: A null reference pointer was passed to the stub. (Exception from HRESULT: 0x800706F4) at VirtualDesktop.IVirtualDesktopManagerInternal.GetDesktops(IntPtr hWndOrMon, IObjectArray& desktops) at VirtualDesktop.DesktopManager.GetDesktopIndex(IVirtualDesktop desktop) at VirtualDesktop.Desktop.FromDesktop(Desktop desktop) at VDeskTool.Program.Main(String[] args)

C:\Users\USERNAME\AppData\Local\VirtualDesktopWrapper>VirtualDesktop11-21H2.exe /RIGHT Switching to right virtual desktop Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at VirtualDesktop.IVirtualDesktopManagerInternal.GetAdjacentDesktop(IVirtualDesktop from, Int32 direction, IVirtualDesktop& desktop) at VirtualDesktop.Desktop.get_Right() at VDeskTool.Program.Main(String[] args)

C:\Users\USERNAME\AppData\Local\VirtualDesktopWrapper>VirtualDesktop11-21H2.exe /LEFT Switching to left virtual desktop Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at VirtualDesktop.IVirtualDesktopManagerInternal.GetAdjacentDesktop(IVirtualDesktop from, Int32 direction, IVirtualDesktop& desktop) at VirtualDesktop.Desktop.get_Left() at VDeskTool.Program.Main(String[] args)

C:\Users\USERNAME\AppData\Local\VirtualDesktopWrapper>VirtualDesktop11-21H2.exe "-Switch:Media" Could not find virtual desktop with name containing 'Media' Error in parameter '-Switch:Media'


With Admin privs:

C:\Users\USERNAME\AppData\Local\VirtualDesktopWrapper>VirtualDesktop11-21H2.exe /LIST

Unhandled Exception: System.Runtime.InteropServices.COMException: A null reference pointer was passed to the stub. (Exception from HRESULT: 0x800706F4) at VirtualDesktop.IVirtualDesktopManagerInternal.GetDesktops(IntPtr hWndOrMon, IObjectArray& desktops) at VirtualDesktop.DesktopManager.GetDesktopIndex(IVirtualDesktop desktop) at VirtualDesktop.Desktop.FromDesktop(Desktop desktop) at VDeskTool.Program.Main(String[] args)

C:\Users\USERNAME\AppData\Local\VirtualDesktopWrapper>VirtualDesktop11-21H2.exe /RIGHT Switching to right virtual desktop Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at VirtualDesktop.IVirtualDesktopManagerInternal.GetAdjacentDesktop(IVirtualDesktop from, Int32 direction, IVirtualDesktop& desktop) at VirtualDesktop.Desktop.get_Right() at VDeskTool.Program.Main(String[] args)

C:\Users\USERNAME\AppData\Local\VirtualDesktopWrapper>VirtualDesktop11-21H2.exe /LEFT Switching to left virtual desktop Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at VirtualDesktop.IVirtualDesktopManagerInternal.GetAdjacentDesktop(IVirtualDesktop from, Int32 direction, IVirtualDesktop& desktop) at VirtualDesktop.Desktop.get_Left() at VDeskTool.Program.Main(String[] args)

C:\Users\USERNAME\AppData\Local\VirtualDesktopWrapper>VirtualDesktop11-21H2.exe "-Switch:Media" Could not find virtual desktop with name containing 'Media' Error in parameter '-Switch:Media'

MScholtes commented 2 years ago

Hello @armbrusterc,

please use VirtualDesktop11-21H2.exe only for Windows 11 21H2, use VirtualDesktop11.exe for the current Windows 11 22H2.

Greetings

Markus

armbrusterc commented 2 years ago

Thank you! I should have tried that before posting an issue. Great work on this project by the way!