GetSecurityUserInfo function (ntifs.h)

The GetSecurityUserInfo function retrieves information about a logon session.

Syntax

NTSTATUS SEC_ENTRY GetSecurityUserInfo(
  [in, optional] PLUID             LogonId,
  [in]           ULONG             Flags,
  [out]          PSecurityUserData *UserInformation
);

Parameters

[in, optional] LogonId

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.

[in] Flags

This parameter is currently not used.

[out] UserInformation

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.

Return value

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.

Remarks

This function obtains information about a logon session via the SecurityUserData structure.

Requirements

Requirement Value
Minimum supported client Windows 2000
Target Platform Universal
Header ntifs.h (include Ntifs.h, FltKernel.h)
Library Ksecdd.lib
IRQL PASSIVE_LEVEL

See also

LsaFreeReturnBuffer

MapSecurityError