Switching from Winlogon desktop to user desktop

1.3k views Asked by At

I have an application running on Winlogon desktop in windows 7. I need to switch to the user desktop on a button click of the application. We can switch manually to the user desktop by pressing ctrl+shift+esc. But the hot keys are blocked by another application. Is there any alternative method for switching?

1

There are 1 answers

0
ScarCode On

Normally system associates a desktop with a thread when that thread is created. You can use this thread to change its desktop. So by keeping track of this thread you can switch back and fourth between your desktops.

You can use, for Ex: GetThreadDesktop,SwitchDesktop,SetThreadDesktop API's for getting the handle to user desktop.Probably you can use other similar API's to complete your task.