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 (包括 Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL

另请参阅

IoGetRequestorProcess