CSecurityAttributes Class

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see CSecurityAttributes Class on docs.microsoft.com. This class is a thin wrapper for the security attributes structure.

System_CAPS_ICON_important.jpg Important

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

class CSecurityAttributes : public SECURITY_ATTRIBUTES

Public Constructors

NameDescription
CSecurityAttributes::CSecurityAttributesThe constructor.

Public Methods

NameDescription
CSecurityAttributes::SetCall this method to set the attributes of the CSecurityAttributes object.

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.

SECURITY_ATTRIBUTES

CSecurityAttributes

Header: atlsecurity.h

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.

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.

Security Sample
SECURITY_ATTRIBUTES
security descriptor
Class Overview
Security Global Functions

Show: