Export (0) Print
Expand All

ISecurityInformation::SetSecurity method

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 Okay or Apply.

Syntax


HRESULT SetSecurity(
  [in]  SECURITY_INFORMATION SecurityInformation,
  [in]  PSECURITY_DESCRIPTOR pSecurityDescriptor
);

Parameters

SecurityInformation [in]

A set of SECURITY_INFORMATION bit flags that indicate the parts of the security descriptor to set. This parameter can be a combination of the following values.

ValueMeaning
OWNER_SECURITY_INFORMATION

The security descriptor contains the SID of the object's owner.

GROUP_SECURITY_INFORMATION

The security descriptor contains the SID of the object's primary group.

DACL_SECURITY_INFORMATION

The security descriptor contains the object's DACL.

SACL_SECURITY_INFORMATION

The security descriptor contains the object's SACL.

 

pSecurityDescriptor [in]

A pointer to a security descriptor containing the new security information. Do not assume the security descriptor is in self-relative form; it can be either absolute or self-relative.

Return value

Returns S_OK if successful.

Returns a nonzero error code if an error occurs.

Remarks

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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Aclui.h

See also

ISecurityInformation
Access Control Editor
Access Control Editor Functions
SECURITY_INFORMATION

 

 

Community Additions

ADD
Show:
© 2014 Microsoft