Group: Security - Library: secur32
How to enumerate logon sessions on local computer
NTSTATUS NTAPI LsaEnumerateLogonSessions(
_Out_ PULONG LogonSessionCount,
_Out_ PLUID *LogonSessionList
);
DECLARE INTEGER LsaEnumerateLogonSessions IN secur32;
INTEGER @LogonSessionCount,;
INTEGER @LogonSessionList
LogonSessionCount [out] Pointer to a long integer that receives the number of elements returned in the array returned in LogonSessionList parameter.
LogonSessionList [out] Address of a pointer to a LUID. The pointer receives the first element of an array of logon session identifiers.
If the function succeeds, the return value is STATUS_SUCCESS (0).
See also: LsaGetLogonSessionData, LsaFreeReturnBuffer