IoGetRequestorSessionId routine

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 [in]

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

pSessionId [out]

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

Target platform

Universal

Version

This routine is available on Microsoft Windows Server 2003 SP1 and later.

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

<= APC_LEVEL

See also

IoGetRequestorProcess
IoGetRequestorProcessId

 

 

Send comments about this topic to Microsoft

Show: