Skip to content

Latest commit

 

History

History
97 lines (73 loc) · 3.04 KB

nf-processthreadsapi-getprocessid.md

File metadata and controls

97 lines (73 loc) · 3.04 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.GetProcessId
GetProcessId function (processthreadsapi.h)
Retrieves the process identifier of the specified process.
GetProcessId
GetProcessId function
base.getprocessid
processthreadsapi/GetProcessId
winbase/GetProcessId
base\getprocessid.htm
processthreadsapi
9a024147-8bfe-427a-af12-a63f23328e38
12/05/2018
GetProcessId, GetProcessId function, base.getprocessid, processthreadsapi/GetProcessId, winbase/GetProcessId
processthreadsapi.h
Windows.h on Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008 Windows Server 2008 R2
Windows
Windows Vista, Windows XP with SP1 [desktop apps \| UWP apps]
Windows Server 2003 [desktop apps \| UWP apps]
Kernel32.lib
Kernel32.dll
Windows
19H1
GetProcessId
processthreadsapi/GetProcessId
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
GetProcessId

GetProcessId function

-description

Retrieves the process identifier of the specified process.

-parameters

-param Process [in]

A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights.

Windows Server 2003 and Windows XP:  The handle must have the PROCESS_QUERY_INFORMATION access right.

-returns

If the function succeeds, the return value is the process identifier.

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 Process Security and Access Rights.

-see-also

GetCurrentProcessId

GetProcessIdOfThread

GetThreadId

Processes