UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:processthreadsapi.GetProcessIdOfThread |
GetProcessIdOfThread function (processthreadsapi.h) |
Retrieves the process identifier of the process associated with the specified thread. |
|
base\getprocessidofthread.htm |
processthreadsapi |
1878088b-e0fd-4009-b608-f491805948b5 |
12/05/2018 |
GetProcessIdOfThread, GetProcessIdOfThread function, base.getprocessidofthread, processthreadsapi/GetProcessIdOfThread, winbase/GetProcessIdOfThread |
processthreadsapi.h |
Windows.h on Windows Vista, Windows 7, Windows Server 2008 Windows Server 2008 R2 |
Windows |
Windows Vista [desktop apps only] |
Windows Server 2003 [desktop apps only] |
Kernel32.lib |
Kernel32.dll |
Windows |
19H1 |
|
|
|
|
|
|
Retrieves the process identifier of the process associated with the specified thread.
A handle to the thread. The handle must have the THREAD_QUERY_INFORMATION or THREAD_QUERY_LIMITED_INFORMATION access right. For more information, see Thread Security and Access Rights.
Windows Server 2003: The handle must have the THREAD_QUERY_INFORMATION access right.
If the function succeeds, the return value is the process identifier of the process associated with the specified thread.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Until a process terminates, its process identifier uniquely identifies it on the system. For more information about access rights, see Thread Security and Access Rights.