次の方法で共有


CSecurityAttributes Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CSecurityAttributes Class.

This class is a thin wrapper for the security attributes structure.

Important

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

Syntax

class CSecurityAttributes : public SECURITY_ATTRIBUTES

Members

Public Constructors

Name Description
CSecurityAttributes::CSecurityAttributes The constructor.

Public Methods

Name Description
CSecurityAttributes::Set Call this method to set the attributes of the CSecurityAttributes object.

Remarks

The SECURITY_ATTRIBUTES structure contains a security descriptor used for the creation of an object and specifies whether the handle retrieved by specifying this structure is inheritable.

For an introduction to the access control model in Windows, see Access Control in the Windows SDK.

Inheritance Hierarchy

SECURITY_ATTRIBUTES

CSecurityAttributes

Requirements

Header: atlsecurity.h

CSecurityAttributes::CSecurityAttributes

The constructor.

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

Parameters

rSecurityDescriptor
Reference to a security descriptor.

bInheritsHandle
Specifies whether the returned handle is inherited when a new process is created. If this member is true, the new process inherits the handle.

CSecurityAttributes::Set

Call this method to set the attributes of the CSecurityAttributes object.

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

Parameters

rSecurityDescriptor
Reference to a security descriptor.

bInheritHandle
Specifies whether the returned handle is inherited when a new process is created. If this member is true, the new process inherits the handle.

Remarks

This method is used by the constructor to initialize the CSecurityAttributes object.

See Also

Security Sample
SECURITY_ATTRIBUTES
security descriptor
Class Overview
Security Global Functions