// ntifs.h
NTSTATUS SeMarkLogonSessionForTerminationNotification(
[in] PLUID LogonId
);
View the official Windows Driver Kit DDI referenceNo description available.
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.
LogonId [in]Pointer to the logon ID of the logon session.
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The logon session was successfully marked. |
| STATUS_NOT_FOUND | The logon session was not found. |
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.
SeRegisterLogonSessionTerminatedRoutine
SeUnregisterLogonSessionTerminatedRoutine