Grabacr07 / VirtualDesktop

C# wrapper for the Virtual Desktop API on Windows 11.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken on Fast Ring (20270+) because of FC_USER_MARSHAL parameter changes

anaisbetts opened this issue · comments

It appears that many Virtual Desktop interfaces now prepend an FC_USER_MARSHAL parameter as their first parameter (breaking the "never change COM interfaces contract!")

image

The interface appears to have changed yet again in 21313:

//Every version the Interface changes, this is the 21313 version
class __declspec(uuid("b2f925b9-5a0f-4d2e-9f4d-2b1507593c10")) IVirtualDesktopManagerInternal_21313 : public IUnknown {
public:
	virtual HRESULT __stdcall Proc3(PVOID* p0, int64_t* p1);
	virtual HRESULT __stdcall MoveViewToDesktop(IApplicationView* p0, IVirtualDesktop* p1);
	virtual HRESULT __stdcall Proc5(IApplicationView* p0, int64_t* p1);
	virtual HRESULT __stdcall Proc6(PVOID* p0, IVirtualDesktop** p1);
	virtual HRESULT __stdcall GetDesktops(PVOID* p0, IObjectArray** p1);
	virtual HRESULT __stdcall Proc8(IVirtualDesktop* p0, int64_t p1, IVirtualDesktop** p2);
	virtual HRESULT __stdcall SwitchDesktop(PVOID* p0, IVirtualDesktop* p1);
	virtual HRESULT __stdcall CreateDesktopW(PVOID* p0, IVirtualDesktop** p1);
	virtual HRESULT __stdcall Proc11(IVirtualDesktop* p0, PVOID* p1, int64_t p2);
	virtual HRESULT __stdcall RemoveDesktop(IVirtualDesktop* p0, IVirtualDesktop* p1);
	virtual HRESULT __stdcall Proc13(GUID* p0, IVirtualDesktop** p1);
	virtual HRESULT __stdcall Proc14(IVirtualDesktop* p0, IObjectArray** p1, IObjectArray** p2);
	virtual HRESULT __stdcall Proc15(IVirtualDesktop* p0, PVOID* p1);
	virtual HRESULT __stdcall Proc16(IVirtualDesktop* p0, PVOID* p1);
	virtual HRESULT __stdcall Proc17(PVOID* p0);
	virtual HRESULT __stdcall Proc18(IApplicationView* p0, IApplicationView* p1);
	virtual HRESULT __stdcall Proc19(int64_t* p0);
};

https://github.com/McYoloSwagHam/win3wm/blob/e50cf7f38da0221ede99e1148ebd8d19397b1ed3/guitest/Types.h#L215-L235

😭😭😭😭, I wonder what that PVOID* at the beginning of those methods are, that's new