handle get_thread_desktop(unsigned identity)

This function obtains the desktop associated with a given thread.


unsigned identity

The identity of the thread for which the desktop is being queried.



null The call failed.
Other The handle of the associated desktop.


The function close_desktop is not required to be applied to the returned handle.

A desktop is associated with a thread when the thread is created. The function set_thread_desktop may be used to change the desktop associated with a thread. The desktop associated with a thread must be on the window station associated with the process of the thread.

The calling process can use the returned handle in calls to the functions: