Platform SDK: DLLs, Processes, and Threads

GetCurrentProcessId

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

DWORD GetCurrentProcessId(VOID);

Parameters

This function has no parameters.

Return Values

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.

MAPI: For more information, see Syntax and Limitations for Win32 Functions Useful in MAPI Development.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Kernel32.lib.

See Also

Processes and Threads Overview, Process and Thread Functions, GetCurrentProcess, OpenProcess