AutoACL Chusov::Win32::Security::CreateDACL | ( | std::initializer_list< ACCESS_ALLOWED_ACE_INFO > | lstAllowed, |
std::initializer_list< ACCESS_DENIED_ACE_INFO > | lstDenied, | ||
DWORD | dwAclRevision = ACL_REVISION |
||
) |
Allocates and returns a managed pointer to a discretionary access control list (DACL), created from access control entries (ACEs), passed to the function within initializer list parameters. Each ACE is specified only by a string of a principal name, possibly with a corresponding domain name, and by a respective access control mask, as defined by the ACE_INFO class template. If both ACE storages are empty, the function returns a "prohibit anyone from anything" empty DACL. .
lstAllowed | is list of ACCESS_ALLOWED_ACE_INFO objects, specifying access-allowed ACEs to be included into the created DACL. |
lstDenied | is list of ACCESS_DENIED_ACE_INFO objects, specifying access-denied ACEs to be included into the created DACL. |
dwAclRevision | is a revision level of the ACL object being created. See InitializeAcl for the proper values of the parameter. |
refAccessAllowedACEs
or refAccessDeniedACEs
containers, the function returns an empty DACL, which prohibits any principal from any access to an object, the DACL is assigned to.The function creates a DACL from the given lists of ACCESS_ALLOWED_ACE_INFO and ACCESS_DENIED_ACE_INFO representations of access-allowed and access-denied control entries respectively. Each element of the both lists requires a string holding principal name and a corresponding access-control Windows bitmask.
If both lists are empty, the function returns an empty DACL, which prohibits any principal from any access to an object, which the DACL is assigned to. See "Null DACLs and Empty DACLs".
std::bad_alloc | The function was unable to allocate a required amount of memory to complete the request. |
Chusov::Exceptions::ArithmeticOverflowException | A size, in bytes, of the DACL to be allocated must fit 32 bits (as specified by DWORD values), but it does not. |
Chusov::Exceptions::ChsvCodeException | System-level error occurred. |