Export (0) Print
Expand All
Expand Minimize

CreateLogonSession function

Creates logon sessions.

The logon session is identified by a unique logon ID ( LUID) assigned to the logon session.

Syntax


NTSTATUS CreateLogonSession(
  _In_  PLUID LogonId
);

Parameters

LogonId [in]

Pointer to an LUID structure to be assigned to the new logon session. An authentication package calls AllocateLocallyUniqueId in order to generate this ID.

Return value

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.

Return codeDescription
STATUS_LOGON_SESSION_COLLISION

The specified logon ID is already in use by another logon session.

 

The LsaNtStatusToWinError function converts an NTSTATUS code to a Windows error code.

Remarks

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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Ntsecpkg.h

See also

DeleteLogonSession
LSA_DISPATCH_TABLE
LSA_SECPKG_FUNCTION_TABLE

 

 

Community Additions

ADD
Show:
© 2015 Microsoft