共用方式為


IoGetRequestorProcess 函式 (ntifs.h)

IoGetRequestorProcess 例程會傳回原本要求指定 I/O 作業之線程的進程指標。

語法

PEPROCESS IoGetRequestorProcess(
  [in] PIRP Irp
);

參數

[in] Irp

I/O 作業之 I/O 要求封包 (IRP) 的指標。

傳回值

IoGetRequestorProcess 會傳回要求 I/O 作業之線程的進程指標。 如果 IRP 未與任何線程相關聯,IoGetRequestorProcess 會傳回 NULL

言論

盯著 Windows Vista。 IoGetRequestorProcess 會傳回線程目前附加之進程的指標。 針對排入檔案物件的 IRP,例如完成埠 I/O,IoGetRequestorProcess 會傳回發行程式的指標。 如果沒有連結線程,IoGetRequestorProcess 會傳回建立線程之進程的指標。

在 Windows XP 上,IoGetRequestorProcess 會傳回線程目前附加之進程的指標。

注意在 Windows XP 上,如果 IRP 包含非 NULL 線程,但沒有鏈接線程,IoGetRequestorProcess 會嘗試存取未定義線程的進程資訊。 如果 IoGetRequestorProcess 在沒有例外狀況處理或 IRQL 太高的情況下呼叫,就會顯示可能的 Bug 檢查條件。

 

在 Windows XP 之前,IoGetRequestorProcess 會傳回建立線程之進程的指標。

如果 I/O 管理員發出或呼叫 ioBuildAsynchronousFsdRequestIoBuildSynchronousFsdRequestIoBuildDeviceIoControlRequest,IRP 會自動與線程產生關聯。

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

要求

要求 價值
目標平臺 普遍
標頭 ntifs.h (include Ntifs.h)
連結庫 NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL

另請參閱

IoBuildAsynchronousFsdRequest

IoBuildDeviceIoControlRequest

IoBuildSynchronousFsdRequest

IoGetRequestorProcessId