// ntifs.h
NTSTATUS SEC_ENTRY GetSecurityUserInfo(
[in, optional] PLUID LogonId,
[in] ULONG Flags,
[out] PSecurityUserData *UserInformation
);
View the official Windows Driver Kit DDI referenceNo description available.
The GetSecurityUserInfo function retrieves information about a logon session.
LogonId [in, optional]An optional pointer to an LUID containing the logon session for which information is to be retrieved. If LogonId is NULL, information for the logon session of the calling thread is returned.
Flags [in]This parameter is currently not used.
UserInformation [out]A pointer to a location which contains a pointer to a SecurityUserData structure. If the function call succeeds, the user information is returned in this structure. The caller is responsible for freeing this buffer by calling the LsaFreeReturnBuffer function.
GetSecurityUserInfo returns an appropriate NTSTATUS value, such as one of the following.
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The SecurityUserData structure, indirectly pointed to by UserInformation, contains the requested user information. |
| STATUS_NO_SUCH_LOGON_SESSION | Indicates that the specified logon session does not exist. |
This function obtains information about a logon session via the SecurityUserData structure.