Creates logon sessions.
The logon session is identified by a unique logon ID ( LUID) assigned to the logon session.
- LogonId [in]
If the function succeeds, the return value is STATUS_SUCCESS.
If the function fails, the return value is an NTSTATUS code, which can be the following value or one of the LSA Policy Function Return Values.
The specified logon ID is already in use by another logon session.
The LsaNtStatusToWinError function converts an NTSTATUS code to a Windows error code.
If an authentication package creates extraneous logon sessions while determining whether to authenticate the user, it should delete them by calling DeleteLogonSession. If the authentication fails, the authentication package should delete all related logon sessions.
Because logon sessions use memory in the kernel, it is important to delete any unused or discarded logon sessions.
Minimum supported client
|Windows XP [desktop apps only]|
Minimum supported server
|Windows Server 2003 [desktop apps only]|