Skip to content
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

"Error: (0x80004002) No such interface supported" after updating Windows 11 (Beta insider channel) #51

Open
reidprichard opened this issue Jul 23, 2023 · 13 comments

Comments

@reidprichard
Copy link

After getting served KB5028256, VD.ah2 no longer works. Line 37 throws "Error: (0x80004002) No such interface supported". I'm afraid I don't have the technical knowledge to do much digging, but I'll do what I can if provided direction.

@hamen
Copy link

hamen commented Jul 25, 2023

I'm afraid I'm seeing the same issue: the latest update broke it 🤦
Regretting being on the Beta program so much right now 🤣

@reidprichard
Copy link
Author

Yeah, I figured I could live with a few bugs in the beta program but didn't expect it would break something so crucial to my workflow!

@JanChec
Copy link

JanChec commented Aug 24, 2023

Broken here too. Since this update will be live for standard users of Windows 11 soon, I'd love to have it fixed.

I'm using:
https://github.com/FuPeiJiang/VD.ahk/blob/class_VD/_VD.ahk

@rushvora
Copy link

rushvora commented Sep 5, 2023

I imagine this explains why the window moving feature doesn't work anymore.

@bfarmilo
Copy link

Looks like VirtualDesktop.cs has been updated, and VirtualDesktop11-23H2.cs should work, see VirtualDesktop/issues/67. I'm not sure how to do this, though, can you point me in the right direction and I can try to do a PR to test this

@Viqsi
Copy link

Viqsi commented Sep 28, 2023

This is as far as I got. Providing as a diff rather than a pull request because I'm not really prepared to go further (and I never actually forked the repo):

diff --git a/VD.ah2 b/VD.ah2
index d90394e..6a78111 100644
--- a/VD.ah2
+++ b/VD.ah2
@@ -19,7 +19,7 @@ class VD {
       this._dll_CreateDesktop := this._dll_CreateDesktop_Win10
       this._dll_GetName := this._dll_GetName_Win10
       this.RegisterDesktopNotifications := this.RegisterDesktopNotifications_Win10
-    } else {
+    } else if (buildNumber < 22620) {
       IID_IVirtualDesktopManagerInternal_ := "{B2F925B9-5A0F-4D2E-9F4D-2B1507593C10}"
       IID_IVirtualDesktop_ := "{536D3495-B208-4CC9-AE26-DE8111275BF8}"
       this._dll_GetCurrentDesktop := this._dll_GetCurrentDesktop_Win11
@@ -27,6 +27,14 @@ class VD {
       this._dll_CreateDesktop := this._dll_CreateDesktop_Win11
       this._dll_GetName := this._dll_GetName_Win11
       this.RegisterDesktopNotifications := this.RegisterDesktopNotifications_Win11
+    } else {
+      IID_IVirtualDesktopManagerInternal_ := "{A3175F2D-239C-4BD2-8AA0-EEBA8B0B138E}"
+      IID_IVirtualDesktop_ := "{3F07F4BE-B107-441A-AF0F-39D82529072C}"
+      this._dll_GetCurrentDesktop := this._dll_GetCurrentDesktop_Win10
+      this._dll_GetDesktops := this._dll_GetDesktops_Win10
+      this._dll_CreateDesktop := this._dll_CreateDesktop_Win10
+      this._dll_GetName := this._dll_GetName_Win11
+      this.RegisterDesktopNotifications := this.RegisterDesktopNotifications_Win11
     }
     this.IVirtualDesktopManager := ComObject("{AA509086-5CA9-4C25-8F95-589D3C07B48A}", "{A5CD92FF-29BE-454C-8D04-D82879FB3F1B}")
     this.GetWindowDesktopId := this._vtable(this.IVirtualDesktopManager.Ptr, 4)
@@ -41,7 +49,7 @@ class VD {
       this.Ptr_CreateDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 10)
       this.Ptr_RemoveDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 11)
       this.FindDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 12)
-    } else if (buildNumber < 22489) {
+    } else if (buildNumber < 22489 or buildNumber >= 22621) {
       this.GetDesktops := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 7)
       this.Ptr_CreateDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 10)
       this.Ptr_RemoveDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 12)

My usage of VD.ahk is limited to exactly four methods: getNameFromDesktopNum, goToDesktopNum, MoveWindowToDesktopNum, and getCurrentDesktopNum. This works for those methods. I have absolutely no idea if any of the others work or not with this change and have no reasonable means of testing. But maybe it'll help.

Basically I started with "it looks like they changed a lot of the function params back to the way they had them in Win10" (based on staring very very hard at that VirtualDesktop.cs project code) and started trial-and-error switching to those instead.

@Viqsi
Copy link

Viqsi commented Sep 29, 2023

Updating another machine revealed that I was guessing the version numbers wrong. So I gave in and forked it. https://github.com/Viqsi/VD.ah2

@reidprichard
Copy link
Author

reidprichard commented Sep 29, 2023

Seems to be working for me (Win11 10.0.22631), super appreciate the efforts!

@Viqsi
Copy link

Viqsi commented Sep 29, 2023

Seems to be working for me (Win11 10.0.22631), super appreciate the efforts!

It's not just the build number, it's the build revision as well; that's what makes this so annoying. 10.0.22631.2134 and earlier revisions are fine with the Old Ways, but 10.0.22631.2283 is not. I suspect the change happened with the preview release 10.0.22631.2215 (and that's what I checked for in the fork), but don't have actual confirmation of that as I don't do preview releases.

@reidprichard
Copy link
Author

Hmm, I did just see an update (in the Release Preview channel), so hopefully that doesn't complicate things. At any rate, I am on 10.22631.2361 now, and I believe VD stopped working for me on 10.0.22631.2050.

@JanChec
Copy link

JanChec commented Sep 30, 2023

Thanks @Viqsi! :) I've applied the update to _VD.ahk, basically the same diff but without the new splitByDot calculation and revNumber and it works: https://gist.github.com/JanChec/a555a42c949ff5f6b78e92362143a9d2

@phazei
Copy link

phazei commented Dec 31, 2023

Just a heads up to the others in this thread that the GUID for the COM has also changed with this months release. Fix in this PR #62

FuPeiJiang added a commit that referenced this issue Feb 14, 2024
@Viqsi
Copy link

Viqsi commented Mar 4, 2024

So far as I can tell this was resolved with 02f37bf. (The referenced commit above presumably fixed it for the AHKv1 version; this one fixes it for the v2 version). At least, I tested it and it Works For Me on build 22631.3155, so I've closed the PR from my fork and will be doing a pull shortly (read: as soon as I get around to it, if I get around to it ;) ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants