Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
ACE
ACL
SID
Expand Minimize

TOKEN_PRIVILEGES structure

The TOKEN_PRIVILEGES structure contains information about a set of privileges for an access token.

Syntax


typedef struct _TOKEN_PRIVILEGES {
  DWORD               PrivilegeCount;
  LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;

Members

PrivilegeCount

This must be set to the number of entries in the Privileges array.

Privileges

Specifies an array of LUID_AND_ATTRIBUTES structures. Each structure contains the LUID and attributes of a privilege. To get the name of the privilege associated with a LUID, call the LookupPrivilegeName function, passing the address of the LUID as the value of the lpLuid parameter.

Important  The constant ANYSIZE_ARRAY is defined as 1 in the public header Winnt.h. To create this array with more than one element, you must allocate sufficient memory for the structure to take into account additional elements.

The attributes of a privilege can be a combination of the following values.

ValueMeaning
SE_PRIVILEGE_ENABLED

The privilege is enabled.

SE_PRIVILEGE_ENABLED_BY_DEFAULT

The privilege is enabled by default.

SE_PRIVILEGE_REMOVED

Used to remove a privilege. For details, see AdjustTokenPrivileges.

SE_PRIVILEGE_USED_FOR_ACCESS

The privilege was used to gain access to an object or service. This flag is used to identify the relevant privileges in a set passed by a client application that may contain unnecessary privileges.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winnt.h (include Windows.h)

See also

AdjustTokenPrivileges
GetTokenInformation
LookupPrivilegeName
LUID
LUID_AND_ATTRIBUTES
PRIVILEGE_SET
PrivilegeCheck
PrivilegedServiceAuditAlarm
SetTokenInformation
TOKEN_CONTROL
TOKEN_DEFAULT_DACL
TOKEN_GROUPS
TOKEN_INFORMATION_CLASS
TOKEN_OWNER
TOKEN_PRIMARY_GROUP
TOKEN_SOURCE
TOKEN_STATISTICS
TOKEN_TYPE
TOKEN_USER

 

 

Community Additions

ADD
Show:
© 2015 Microsoft