IoGetRequestorSessionId function

The IoGetRequestorSessionId routine returns the session ID for the process that originally requested a given I/O operation.

Syntax

NTSTATUS IoGetRequestorSessionId(
  _In_  PIRP   Irp,
  _Out_ PULONG pSessionId
);

Parameters

Irp

A pointer to the I/O request packet (IRP) for the I/O operation.

pSessionId

A pointer to a caller-allocated variable that receives the session ID for the process that requested the I/O operation. If the call to IoGetRequestorProcessId fails, this variable is set to -1.

Return Value

IoGetRequestorProcessId returns STATUS_SUCCESS if the session ID is successfully returned, STATUS_UNSUCCESSFUL otherwise. STATUS_UNSUCCESSFUL is an error NTSTATUS value.

Requirements

   
Windows version This routine is available on Microsoft Windows Server 2003 SP1 and later. This routine is available on Microsoft Windows Server 2003 SP1 and later.
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL "<= APC_LEVEL"

See Also

IoGetRequestorProcessId

IoGetRequestorProcess

Send comments about this topic to Microsoft