Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CTokenPrivileges Class
Collapse the table of content
Expand the table of content

CTokenPrivileges Class

This class is a wrapper for the TOKEN_PRIVILEGES structure.

Important note Important

This class and its members cannot be used in applications that execute in the Windows Runtime.

class CTokenPrivileges




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.



CTokenPrivileges::operator const TOKEN_PRIVILEGES *

Casts a value to a pointer to the TOKEN_PRIVILEGES structure.

CTokenPrivileges::operator =

Assignment operator.

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.

Header: atlsecurity.h

© 2015 Microsoft