Share via


AtlSetDacl

Call this function to set the discretionary access-control list (DACL) information of a specified object.

inline bool AtlSetDacl( 
   HANDLE hObject, 
   SE_OBJECT_TYPE ObjectType, 
   const CDacl& rDacl, 
   DWORD dwInheritanceFlowControl = 0 
) throw(...);

Parameters

  • hObject
    Handle to the object for which to set security information.

  • ObjectType
    Specifies a value from the SE_OBJECT_TYPE enumeration that indicates the type of object identified by the hObject parameter.

  • rDacl
    The DACL containing the new security information.

  • dwInheritanceFlowControl
    The inheritance flow control. This value can be 0 (the default), PROTECTED_DACL_SECURITY_INFORMATION or UNPROTECTED_DACL_SECURITY_INFORMATION.

Return Value

Returns true on success, false on failure.

Remarks

In debug builds, an assertion error will occur if hObject is invalid, or if dwInheritanceFlowControl is not one of the three permitted values.

Requirements

Header: atlsecurity.h

See Also

Reference

AtlGetDacl

CDacl Class

Other Resources

Security Global Functions