TOKEN_PRIVILEGES&LUID_AND_ATTRIBUTES structure

来源:互联网 发布:本溪 农业 盘古网络 编辑:程序博客网 时间:2024/06/05 14:09

typedef struct _TOKEN_PRIVILEGES
{
ULONG PrivilegeCount; //数组元素的个数
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]; //数组.类型为LUID_AND_ATTRIBUTES
} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
有关LUID_AND_ATTRIBUTES,请查阅MSDN.
成员
PrivilegeCount
指定 特权数组的个数(因为下一个参数是一个数组)
Privileges
一个LUID_AND_ATTRIBUTES结构体. 每个结构体包括LUID和特权的属性. 特权的属性可以是下列值的组合:

属性
描述
SE_PRIVILEGE_ENABLED_BY_DEFAULT
特权默认启用
SE_PRIVILEGE_ENABLED
特权启用.
SE_PRIVILEGE_USED_FOR_ACCESS
特权被用来访问一个对象或服务。
这个标志 被用于 标识有关特权,因为
通过一组客户端应用程序,可能包含不必要的特权

LUID_AND_ATTRIBUTES structure

Syntax
C++
typedef struct _LUID_AND_ATTRIBUTES {
LUID Luid;
DWORD Attributes;
} LUID_AND_ATTRIBUTES, *PLUID_AND_ATTRIBUTES;

Members
Luid

Specifies an LUID value.
Attributes
Specifies attributes of the LUID. This value contains up to 32 one-bit flags. Its meaning is dependent on the definition and use of the LUID.
Remarks
An LUID_AND_ATTRIBUTES structure can represent an LUID whose attributes change frequently, such as when the LUID is used to represent privileges in thePRIVILEGE_SET structure. Privileges are represented by LUIDs and have attributes indicating whether they are currently enabled or disabled.

原创粉丝点击