Skip to content

Latest commit

 

History

History
97 lines (73 loc) · 3.18 KB

nf-processthreadsapi-getprocessidofthread.md

File metadata and controls

97 lines (73 loc) · 3.18 KB
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.
GetProcessIdOfThread
GetProcessIdOfThread function
base.getprocessidofthread
processthreadsapi/GetProcessIdOfThread
winbase/GetProcessIdOfThread
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
GetProcessIdOfThread
processthreadsapi/GetProcessIdOfThread
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-ProcessThreads-l1-1-0.dll
KernelBase.dll
MinKernelBase.dll
API-MS-Win-Core-ProcessThreads-l1-1-1.dll
API-MS-Win-Core-ProcessThreads-l1-1-2.dll
api-ms-win-downlevel-kernel32-l1-1-0.dll
API-MS-Win-Core-ProcessThreads-L1-1-3.dll
GetProcessIdOfThread

GetProcessIdOfThread function

-description

Retrieves the process identifier of the process associated with the specified thread.

-parameters

-param Thread [in]

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.

-returns

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.

-remarks

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.

-see-also

GetCurrentThreadId

GetProcessId

GetThreadId

Processes