SeMarkLogonSessionForTerminationNotification function (ntifs.h)

The SeMarkLogonSessionForTerminationNotification routine marks a logon session so that the caller's registered callback routine is called when the logon session terminates. A logon session terminates when the last token referencing the logon session is deleted.

Syntax

NTSTATUS SeMarkLogonSessionForTerminationNotification(
  [in] PLUID LogonId
);

Parameters

[in] LogonId

Pointer to the logon ID of the logon session.

Return value

Return code Description
STATUS_SUCCESS
The logon session was successfully marked.
STATUS_NOT_FOUND
The logon session was not found.

Remarks

To register the callback routine, use SeRegisterLogonSessionTerminatedRoutine.

For more information about security and access control, see Windows security model for driver developers and the documentation on these topics in the Windows SDK.

Requirements

Requirement Value
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See also

LUID

SeRegisterLogonSessionTerminatedRoutine

SeUnregisterLogonSessionTerminatedRoutine