Windows API Reference

Microsoft Platform SDK

GetCurrentProcessId

DWORD GetCurrentProcessId( void );

The GetCurrentProcessId function returns the process identifier of the calling process.

Remarks

The process identifier is a unique value that is assigned to a process when it is created. It is not guaranteed to be contiguous or sequential.

To obtain a handle to the current process, use the GetCurrentProcess function.

Return Value

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

System Requirements

Minimum supported client Windows 2000 Professional
Minimum supported server Windows 2000 Server
Header winbase.h (include Windows.h)

See Also

GetCurrentProcess
GetThreadId
Process and Thread Functions