Process and Thread Function ...


GetCurrentProcessId Function

Retrieves the process identifier of the calling process.

Syntax

C++
DWORD WINAPI GetCurrentProcessId(void);

Parameters

This function has no parameters.

Return Value

The return value is the process identifier of the calling process.

Remarks

Until the process terminates, the process identifier uniquely identifies the process throughout the system.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

GetCurrentProcess
OpenProcess
Process and Thread Functions
Processes

Send comments about this topic to Microsoft

Build date: 10/8/2009

Tags :


Community Content

dmex
vb.net syntax
<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Public Shared Function GetCurrentProcessId() As UInt32 End Function
Tags : vb.net syntax

dmex
C# syntax
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern uint GetCurrentProcessId();
Tags : c# syntax

Page view tracker