TOKEN_PRIVILEGES structure (winnt.h)
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[ANYSIZE_ARRAY]
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.
Value | Meaning |
---|---|
|
The privilege is enabled. |
|
The privilege is enabled by default. |
|
Used to remove a privilege. For details, see AdjustTokenPrivileges. |
|
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
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | winnt.h (include Windows.h) |