CTokenPrivileges Class
This class is a wrapper for the TOKEN_PRIVILEGES structure.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
class CTokenPrivileges
Members
Public Constructors
Name |
Description |
---|---|
The constructor. |
|
The destructor. |
Public Methods
Name |
Description |
---|---|
Adds one or more privileges to the CTokenPrivileges object. |
|
Deletes a privilege from the CTokenPrivileges object. |
|
Deletes all privileges from the CTokenPrivileges object. |
|
Returns the number of privilege entries in the CTokenPrivileges object. |
|
Retrieves display names for the privileges contained in the CTokenPrivileges object. |
|
Returns the buffer size in bytes required to hold the TOKEN_PRIVILEGES structure represented by the CTokenPrivileges object. |
|
Retrieves the locally unique identifiers (LUIDs) and attribute flags from the CTokenPrivileges object. |
|
Retrieves the privilege names and attribute flags from the CTokenPrivileges object. |
|
Returns a pointer to the TOKEN_PRIVILEGES structure. |
|
Retrieves the attribute associated with a given privilege name. |
Public Operators
Name |
Description |
---|---|
Casts a value to a pointer to the TOKEN_PRIVILEGES structure. |
|
Assignment operator. |
Remarks
An access token is an object that describes the security context of a process or thread and is allocated to each user logged onto a Windows NT or Windows 2000 system.
The access token is used to describe the various security privileges granted to each user. A privilege consists of a 64-bit number called a locally unique identifier (LUID) and a descriptor string.
The CTokenPrivileges class is a wrapper for the TOKEN_PRIVILEGES structure and contains 0 or more privileges. Privileges can be added, deleted, or queried using the supplied class methods.
For an introduction to the access control model in Windows, see Access Control in the Windows SDK.
Requirements
Header: atlsecurity.h