Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.25 KB

SetThreadDesktop.md

File metadata and controls

48 lines (31 loc) · 1.25 KB

Home

Function name : SetThreadDesktop

Group: Window Station and Desktop - Library: user32


Assigns the specified desktop to the calling thread. All subsequent operations on the desktop use the access rights granted to hDesktop.


Code examples:

How to prevent users from accessing the Windows Desktop and from switching to other applications

Declaration:

BOOL SetThreadDesktop(
	HDESK hDesktop
);
  

FoxPro declaration:

DECLARE INTEGER SetThreadDesktop IN user32;
	INTEGER hDesktop  

Parameters:

hDesktop [in] Handle to the desktop to be assigned to the calling thread. This handle is returned by the CreateDesktop, GetThreadDesktop, OpenDesktop, or OpenInputDesktop function.


Return value:

If the function succeeds, the return value is nonzero.


Comments:

See also: CreateDesktop, GetThreadDesktop, OpenDesktop, SetProcessWindowStation.