Share via


GetCurrentProcessId 函式 (processthreadsapi.h)

擷取呼叫進程的進程標識碼。

Syntax

DWORD GetCurrentProcessId();

傳回值

傳回值是呼叫進程的進程標識碼。

備註

在進程終止之前,進程標識碼會唯一識別整個系統的進程。

規格需求

需求
最低支援的用戶端 Windows XP [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2003 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 processthreadsapi.h (Windows Server 2003、Windows Vista、Windows 7、Windows Server 2008 Windows Server 2008 R2)
程式庫 Kernel32.lib
DLL Kernel32.dll

另請參閱

GetCurrentProcess

OpenProcess

處理序和執行緒函式

程序