AutoSecurityDescriptor Chusov::Win32::Security::CreateSecurityDescriptor | ( | PSID | pOwner, |
PSID | pGroup, | ||
PACL | pDacl | ||
) |
Allocates and initializes a self-relative security descriptor with the specified owner and group, identified by security identifiers (SID), and with a discretionary access control list (DACL). Each of these elements of the created security descriptor are optional.
[in] | pOwner | is an optional pointer to a SID of a security descriptor owner. If the pointer is NULL, the owner is not set. |
[in] | pGroup | is an optional pointer to a SID of a security descriptor group. If the pointer is NULL, the group is not set. |
[in] | pDacl | is an optional pointer to a DACL to be assigned to the created security descriptor. If the pointer is NULL, the created security descriptor will not have the DACL. |
A revision of the created DACL corresponds to ACL_REVISION constant. See InitializeAcl for more detailed information.
The following example demonstrates a usage of the function:
std::bad_alloc | The function was unable to allocate a required amount of memory to complete the request. |
Chusov::Exceptions::ChsvCodeException | System-level error occurred. |