共用方式為


IoGetRequestorProcessId 函式 (ntifs.h)

IoGetRequestorProcessId 例程會針對原本要求指定 I/O 作業的線程傳回唯一的 32 位進程識別符。

語法

ULONG IoGetRequestorProcessId(
  [in] PIRP Irp
);

參數

[in] Irp

指定 I/O 作業之 I/O 要求封包的指標。

傳回值

IoGetRequestorProcessId 會傳回要求 I/O 作業之線程的進程識別碼。 如果 IRP 未與任何線程相關聯,IoGetRequestorProcessId 會傳回零。

言論

Microsoft Windows XP 和更新版本上,IoGetRequestorProcessId 會傳回線程目前附加的進程的進程標識符。

Microsoft Windows 2000 和更早版本上,IoGetRequestorProcessId 會傳回建立線程之進程的進程標識符。

如需在非bitrary 線程內容中使用系統線程和管理同步處理的詳細資訊,請參閱 驅動程式線程、發送器對象和資源

要求

要求 價值
最低支援的用戶端 Windows 2000
目標平臺 普遍
標頭 ntifs.h (include Ntifs.h)
連結庫 NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL

另請參閱

IoGetRequestorProcess