CSecurityAttributes 类

此类是安全属性结构的薄包装器。

重要

无法在 Windows 运行时中执行的应用程序中使用此类及其成员。

语法

class CSecurityAttributes : public SECURITY_ATTRIBUTES

成员

公共构造函数

名称 描述
CSecurityAttributes::CSecurityAttributes 构造函数。

公共方法

名称 描述
CSecurityAttributes::Set 调用此方法可设置 CSecurityAttributes 对象的属性。

备注

SECURITY_ATTRIBUTES 结构包含用于创建对象的安全描述符,并指定通过指定此结构检索到的句柄是否可继承。

有关 Windows 中访问控制模型的简介,请参阅 Windows SDK 中的访问控制

继承层次结构

SECURITY_ATTRIBUTES

CSecurityAttributes

要求

标头: atlsecurity.h

CSecurityAttributes::CSecurityAttributes

构造函数。

CSecurityAttributes() throw();
explicit CSecurityAttributes(const CSecurityDesc& rSecurityDescriptor, bool bInheritsHandle = false) throw(...);

参数

rSecurityDescriptor
对安全描述符的引用。

bInheritsHandle
指定在创建新进程时是否继承返回的句柄。 如果此成员为 true,则新进程继承该句柄。

CSecurityAttributes::Set

调用此方法可设置 CSecurityAttributes 对象的属性。

void Set(const CSecurityDesc& rSecurityDescriptor, bool bInheritHandle = false) throw(...);

参数

rSecurityDescriptor
对安全描述符的引用。

bInheritHandle
指定在创建新进程时是否继承返回的句柄。 如果此成员为 true,则新进程继承该句柄。

备注

构造函数使用此方法初始化 CSecurityAttributes 对象。

另请参阅

安全示例
SECURITY_ATTRIBUTES
安全描述符
类概述
安全全局函数