---
name: "GetThreadDesktop"
section: "3w"
platform: "linux"
package: "wine-doc"
version: "0.0.981018-1.1"
release: "Debian 2.1 (Slink)"
platforms: ["linux"]
url: "https://carta.tech/man/GetThreadDesktop"
---

# GetThreadDesktop(3w)

GetThreadDesktop \[USER32.295\] Returns handle to desktop

## NAME

GetThreadDesktop - GetThreadDesktop \[USER32.295\]  Returns handle to desktop

## SYNOPSIS

**DWORD GetThreadDesktop(DWORD dwThreadId);**

## DESCRIPTION

GetThreadDesktop \[USER32.295\]  Returns handle to desktop.

## RETURNS

- **Success**

  Handle to desktop associated with specified thread.

- **Failure**

  NULL.

## NOTES

Docs say the return value is HDESK.

## PARAMS

DwThreadId \[I\] Thread identifier.

## SEE ALSO

[UTRegister(3w)](/man/UTRegister/3w.md), [UTUnRegister(3w)](/man/UTUnRegister/3w.md), [QueryPerformanceCounter(3w)](/man/QueryPerformanceCounter/3w.md), [QueryPerformanceFrequency(3w)](/man/QueryPerformanceFrequency/3w.md), [FlushInstructionCache(3w)](/man/FlushInstructionCache/3w.md), [CreateNamedPipeA(3w)](/man/CreateNamedPipeA/3w.md), [CreateNamedPipeW(3w)](/man/CreateNamedPipeW/3w.md), [CreatePipe(3w)](/man/CreatePipe/3w.md), [GetSystemPowerStatus(3w)](/man/GetSystemPowerStatus/3w.md), [SetSystemPowerState(3w)](/man/SetSystemPowerState/3w.md), [CreateMailslotA(3w)](/man/CreateMailslotA/3w.md), [CreateMailslotW(3w)](/man/CreateMailslotW/3w.md), [GetMailslotInfo(3w)](/man/GetMailslotInfo/3w.md), [GetCompressedFileSizeA(3w)](/man/GetCompressedFileSizeA/3w.md), [GetCompressedFileSizeW(3w)](/man/GetCompressedFileSizeW/3w.md), [GetProcessWindowStation(3w)](/man/GetProcessWindowStation/3w.md), [SetDebugErrorLevel(3w)](/man/SetDebugErrorLevel/3w.md), [WaitForDebugEvent(3w)](/man/WaitForDebugEvent/3w.md), [SetComputerNameA(3w)](/man/SetComputerNameA/3w.md), [SetComputerNameW(3w)](/man/SetComputerNameW/3w.md), [IsDebuggerPresent(3w)](/man/IsDebuggerPresent/3w.md), [OpenDesktopA(3w)](/man/OpenDesktopA/3w.md)
