The SwitchDesktop function makes a desktop visible and activates it. This enables the desktop to receive input from the user. The calling process must have DESKTOP_SWITCHDESKTOP access to the desktop for the SwitchDesktop function to succeed.
BOOL SwitchDesktop(
HDESK hDesktop |
// handle of desktop to activate |
); |
The SwitchDesktop function will fail if the desktop belongs to an invisible window station.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.