Platform SDK: Access Control |
The SetSecurity method provides a security descriptor containing the security information the user wants to apply to the securable object. The access control editor calls this method when the user clicks the Okay or Apply buttons.
HRESULT SetSecurity( SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor );
Value | Meaning |
---|---|
OWNER_SECURITY_INFORMATION | If this flag is set, the security descriptor contains the SID of the object's owner. |
GROUP_SECURITY_INFORMATION | If this flag is set, the security descriptor contains the SID of the object's primary group. |
DACL_SECURITY_INFORMATION | If this flag is set, the security descriptor contains the object's DACL. |
SACL_SECURITY_INFORMATION | If this flag is set, the security descriptor contains the object's SACL. |
Return S_OK if successful.
Return a nonzero error code if an error occurs.
To build a complete security descriptor for the object, the application must merge the new security descriptor parts, as defined by the SecurityInformation parameter, into the object's existing security descriptor.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Aclui.h.
Access Control Editor Overview, Access Control Editor Interfaces, SECURITY_INFORMATION