IoGetRequestorProcessId 函数 (ntifs.h)

IoGetRequestorProcessId 例程返回最初请求给定 I/O作的线程的唯一 32 位进程 ID。

语法

ULONG IoGetRequestorProcessId(
  [in] PIRP Irp
);

参数

[in] Irp

指向指定 I/O作的 I/O 请求数据包(IRP)的指针。

返回值

IoGetRequestorProcessId 返回请求 I/O作的线程的进程 ID。 如果 IRP 未与任何线程关联,IoGetRequestorProcessId 返回零。

言论

Microsoft Windows XP 及更高版本上,IoGetRequestorProcessId 返回线程当前附加到的进程的进程 ID。

Microsoft Windows 2000 及更早版本,IoGetRequestorProcessId 返回创建线程的进程的进程 ID。

有关在非比特线程上下文中使用系统线程和管理同步的详细信息,请参阅 驱动程序线程、调度程序对象和资源

要求

要求 价值
最低支持的客户端 Windows 2000
目标平台 普遍
标头 ntifs.h (include Ntifs.h)
NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL

另请参阅

IoGetRequestorProcess