Hi All,
I am using Win32 desktop API's to make use of virtual desktop on windows machine.
Desktop methods which I am using in my program are:
- CreateDesktop
- CloseDesktop
- SwitchDesktop
- OpenDesktop
I am successfully able to create, open, switch and close desktops. As per Win32 API’s there is no method to delete virtual desktop. MSDN documentation says that only way to delete virtual desktop is that you kill all processes in that a desktop and it will be deleted by the OS.
Also MSDN documentations have remark in CloseDesktop API is given below
The CloseDesktop function will fail if any thread in the calling process is using the specified desktop handle or if the handle refers to the initial desktop of the calling process.
In order to delete my virtual desktop, I launch a process which kills all running processes on that desktop and then kill itself. This process fails to delete my virtual desktop and it remains in the system till I reboot my machine.
Am I doing something wrong or is it not possible to delete virtual desktop without rebooting machine.
Thanks in advance.
Regards
Al Harper