IoGetRequestorSessionId function (ntifs.h)
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
[in] Irp
A pointer to the I/O request packet (IRP) for the I/O operation.
[out] 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 fails (STATUS_UNSUCCESSFUL), this parameter is set to -1.
Return value
IoGetRequestorSessionId returns STATUS_SUCCESS if the session ID is successfully returned, and returns STATUS_UNSUCCESSFUL otherwise. STATUS_UNSUCCESSFUL is an error NTSTATUS value.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Server 2003 SP1 |
Target Platform | Universal |
Header | ntifs.h (include Ntifs.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | <= APC_LEVEL |