So I am implementing a win-tab-like interface under Windows 10. I trying to move window of other process to another virtual desktop. Using API from this question I can already move my own application to any desktop. But when I am moving other windows when calling MoveWindowToDesktop(IntPtr TopLevelWindow, Guid CurrentDesktop), I got E_ACCESSDENIED as return code. In this Github project someone managed to hook a DLL to other process so user can trigger this function successfully.
How can I achieve this?