FltGetRequestorSessionId function (fltkernel.h)

The FltGetRequestorSessionId routine returns the session ID of the process that originally requested the specified I/O operation.

Syntax

NTSTATUS FLTAPI FltGetRequestorSessionId(
  [in]  PFLT_CALLBACK_DATA CallbackData,
  [out] PULONG             SessionId
);

Parameters

[in] CallbackData

A pointer to the FLT_CALLBACK_DATA structure specifying the I/O operation.

[out] SessionId

A pointer to the session ID for the requesting operation.

Return value

The FltGetRequestorSessionId routine returns STATUS_SUCCESS on success or STATUS_UNSUCCESSFUL on failure.

Remarks

If a process has no session ID, the SessionId parameter refers to -1 and the FltGetRequestorSessionId routine returns STATUS_SUCCESS.

If the FltGetRequestorSessionId routine returns STATUS_UNSUCCESSFUL, SessionId is not valid.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows 7 and later versions of the Windows operating system.
Target Platform Universal
Header fltkernel.h (include FltKernel.h)
Library FltMgr.lib
DLL Fltmgr.sys
IRQL <= APC_LEVEL