Platform SDK: DLLs, Processes, and Threads |
The GetCurrentProcessId function retrieves the process identifier of the calling process.
DWORD GetCurrentProcessId(VOID);
This function has no parameters.
The return value is the process identifier of the calling process.
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.
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.
Processes and Threads Overview, Process and Thread Functions, GetCurrentProcess, OpenProcess