I am sure you are misunderstood concept of desktops. In Windows desktop is securable object, not graphical entity. Not confuse with Desktop in Windows Shell namespace.
Also is possible create windows app without any window so SetThreadDesktop works for windows app too, not only for console.
And last note: Input desktop is designed for input, why you want move any windows from another desktop? What is your design goal?