Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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

Name

Description

CTokenPrivileges::Add

Adds one or more privileges to the CTokenPrivileges object.

CTokenPrivileges::Delete

Deletes a privilege from the CTokenPrivileges object.

CTokenPrivileges::DeleteAll

Deletes all privileges from the CTokenPrivileges object.

CTokenPrivileges::GetCount

Returns the number of privilege entries in the CTokenPrivileges object.

CTokenPrivileges::GetDisplayNames

Retrieves display names for the privileges contained in the CTokenPrivileges object.

CTokenPrivileges::GetLength

Returns the buffer size in bytes required to hold the TOKEN_PRIVILEGES structure represented by the CTokenPrivileges object.

CTokenPrivileges::GetLuidsAndAttributes

Retrieves the locally unique identifiers (LUIDs) and attribute flags from the CTokenPrivileges object.

CTokenPrivileges::GetNamesAndAttributes

Retrieves the privilege names and attribute flags from the CTokenPrivileges object.

CTokenPrivileges::GetPTOKEN_PRIVILEGES

Returns a pointer to the TOKEN_PRIVILEGES structure.

CTokenPrivileges::LookupPrivilege

Retrieves the attribute associated with a given privilege name.

Name

Description

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.