-
Notifications
You must be signed in to change notification settings - Fork 134
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
Not working with Windows 11 22H2 ? #76
Comments
Me too |
Looks like this is due to missing CLSIDs and possibly the addition of Newlooper's VirtualSpace runs correctly so I hoped plugging in the guids from there would work. I tried adding them for my OS version (22621, but 22H2 is >22489?):
That leaves the demo with a null reference at |
After comparing the codes with VirtualSpace
I tried to add
Problem solved. I can run for 22H2 Please try |
@kenykau Can you share the patch of your changes specifically? I tried adding |
Aight the following patch worked for me! |
how do you install this patch? |
Hi @Grabacr07. I've made a PR with a fix for this issue on newer Windows 11 builds: #79. This may also fix some newer Window 10 installations due to the changes in how COM GUIDs are selected. Have a look when you get a chance and let me know if you're happy to accept it as is or you'd like some changes. |
Thanks a lot! Just downloaded your version and its working 🎉 |
@maciej-makowski fantastic work. I am still hoping @Grabacr07 will merge this in so I don't have to switch to your fork's code base, however if this isn't coming please consider making more enhancements to your fork :) |
Thanks a lot @maciej-makowski, I was facing same error and able to run with your fork's code. |
I've reached out to @Grabacr07 when I made this change offering help maintaining this library. He hasn't responded yet. I might get around publishing my fork as a separate NuGet package, since I myself came across the issue via glsorre/amethystwindows#86 and it would be great to have a working official build of AmethystWindows. |
Hi @maciej-makowski Please guide to solve or make another commit. Thanks
Stack Trace
Line of Code
|
Hi @Taster-git, That usually means that Microsoft changed the underlying Windows API between versions adding new function or parameter. I don't remember of the top of my head how you can find it, I will try to find some time this weekend to review how what I did few months ago |
Thanks for your reply. Ok waiting on daily basis. |
Does this mean that @maciej-makowski changes which fixed Windows11 22H2 broke support for older Windows 10 versions? I doubt Microsoft is changing those API on Windows10 these days. |
Hello @maciej-makowski ! Any news or updates? I think is not working on latest Windows 11 version? |
Hi @3dtoall. I have never heard back from @Grabacr07 on the maintenance. I was toying with the of maintaining a fork of this package a while ago, but after looking a bit more into it, decided against it. The reason why this package keeps breaking between Windows upgrades is, it depends on an undocumented low-level functions in Windows API. This is also a reason why it's quite difficult to fix and relese, since every time new Windows 10 or 11 version gets released it's a potential breaking change and you have to reverse-enginner the API calls and patch the library. I briefly looked into automating the process, but couldn't work it out and ultimately gave up on the idea. I think, until VirtualDesktop Windows API stabilises, this will always be a big maintenance burden and unfortunately, I don't have this much time available. |
Looks like this guy has it working. |
@maciej-makowski I just test your patch and it seems to work fine still on 22621. Any chance we could document the reverse engineering process? So that next time around someone else could take that burden? |
I just published it as Slions.VirtualDesktop for anyone to use. Did minimal testing with it and it seems to be working fine. I'm planning to update that Taskbar Pro app of mine to make use of it. |
I've added documentation about finding class IDs for your version of Windows: |
@Slion This is still broken on build |
Is that insider build? You can follow the instructions above to fetch the IDs. |
@Slion Unfortunately it seems they have removed the registry entries that you referenced, at least in some installs (I've read that whether these IID entries exist depend on when you installed the OS), searching for |
Could you reference your sources? Did you try to search the whole registry? Maybe it's in another path? If that's the case we will need to find another way to get them, somehow. |
Looks like this article could be useful to obtain our Ids: Would be fantastic if @Grabacr07 and @maciej-makowski would find some time to share their expertise on reverse engineering. |
I searched the entire registry, there are lots of partial matches but checking "Use Whole Word" => zero matches. |
That's weird, my insider build is currently 25206 and there too I can't find those ids anywhere in the registry. We will have to find another way then. |
Looks like the link above is exactly what we need. You first need to get the list of all CLSID on your system by running the following powershell commands. Then I ran a modified version of their script which can be resumed after a crash, that looks like that: $Position = 1
$StartAt = 7004
$Filename = "win10-clsid-members.txt"
$inputFilename = "clsids.txt"
ForEach($CLSID in Get-Content $inputFilename) {
if ($Position -ge $StartAt) {
Write-Output "$($Position) - $($CLSID)"
Write-Output "------------------------" | Out-File $Filename -Append
Write-Output "$($Position)" | Out-File $Filename -Append
Write-Output "------------------------" | Out-File $Filename -Append
Write-Output $($CLSID) | Out-File $Filename -Append
$handle = [activator]::CreateInstance([type]::GetTypeFromCLSID($CLSID))
$handle | Get-Member | Out-File $Filename -Append
} else {
Write-Output "Skip $($Position) - $($StartAt)"
}
$Position += 1
}
# Crash on:
# 587
# 845
# 1600
# 2397
# 2872
# 3828
# 4063
# 4517
# 4555
# 5327
# 5699
# 6104
# 6870
# 7003 Sadly no joy I could not find the interfaces we are looking for. I also could not find them in |
Maybe we could locate the DLLs we need and inspect them as suggested here: Path to |
So going through |
I replied to the email I got for #76 (comment) thinking it would endup here but seems not.... Yes, I have also found the IDs are removed in some cases too so we may have to fall back to hard coded ids based on build number if they can't be found. I was working on something like that on my fork but not sure I got as far as pushing it up as it still didn't work as I expected. .... This comment was a previous pull request on this topic. mntone#1 (comment) and describes the process. twinui.pcshell.dll used to be the dll you are probably looking for. |
Also note the compiled dll is cached and needs to be deleted if you want to pick up changes (unless that has changed). Believe it ends up in %LocalAppData%\grabacr.net\VirtualDesktop\assemblies May be why my switching versions didn't work as I mention on mntone#1 (comment) |
@sliddington Thanks for the pointers. That looks like extremely valuable information. Looking at the code I saw the path where it does the ids lookup in the registry and I was wondering if that is still in use. I'm guessing it is not because I recently had to hard code ids for my version of Windows 10 which did have them in the registry. So IDs are indeed now hard coded per Windows version in the application settings through I'll also watch out for caching of that runtime generated DLL. Though that might have been fixed somehow as when I added those new set of IDs the other day I did not have to delete the DLL manually. Though it cloud be I did a clean and rebuild. |
I think this explains an issue I'm having with Taskbar. I patched the VirtualDesktop updated it and republished the app but on the Windows 10 I was testing it on it still won't offer virtual desktop features. Most likely the DLL is not being regenerated. I'll have to find a solution for that. |
I did try a bunch of stuff with OleViewDotNet and Neither DLLs can be registered using |
Some new information from @mzomparelli on that other thread ... |
@sliddington Thanks for putting me in touch with @mzomparelli as he did come up with a proper reverse engineering of the latest Windows changes. All the good stuff now available from my fork. |
@Slion FYI, it doesn't work if you build your app as a .NET "single file application" because if fails to read the sources for the assembly compilation. |
Works on Windows 10.
Testing on Windows 11 22H2, I get this error:
The text was updated successfully, but these errors were encountered: