Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.2 KB

GetThreadDesktop.md

File metadata and controls

48 lines (32 loc) · 1.2 KB

Home

Function name : GetThreadDesktop

Group: Window Station and Desktop - Library: user32


The GetThreadDesktop function retrieves a handle to the desktop associated with a specified thread.


Code examples:

Obtaining a handle to the desktop associated with the calling thread
How to prevent users from accessing the Windows Desktop and from switching to other applications

Declaration:

HDESK GetThreadDesktop(
  DWORD dwThreadId   // thread identifier
);  

FoxPro declaration:

DECLARE INTEGER GetThreadDesktop IN user32;
	INTEGER dwThreadId  

Parameters:

dwThreadId [in] Handle to the thread for which to return the desktop handle. The GetCurrentThreadId and CreateProcess functions return thread identifiers.


Return value:

If the function succeeds, the return value is a handle to the desktop associated with the specified thread.


Comments:

Windows 95/98/Me: The system does not support multiple desktops, so GetThreadDesktop always returns the same value.