Condividi tramite


CSecurityDesc::SetGroup

Sets the primary group information of an absolute format security descriptor, replacing any primary group information already present.

bool SetGroup( 
   const CSid & Sid, 
   bool bDefaulted = false  
) throw(...);

Parameters

  • Sid
    Reference to a CSid object for the security descriptor's new primary group. This parameter must not be NULL. A security descriptor can be marked as not having a DACL or a SACL, but it must have a group and an owner, even it these are the NULL SID (which is a built-in SID with a special meaning).

  • bDefaulted
    Indicates whether the primary group information was derived from a default mechanism. If this value is true, it is default information, and the method stores this value as the SE_GROUP_DEFAULTED flag in the SECURITY_DESCRIPTOR_CONTROL structure. If this parameter is zero, the SE_GROUP_DEFAULTED flag is cleared.

Return Value

Returns true on success, false on failure.

Requirements

Header: atlsecurity.h

See Also

Reference

CSecurityDesc Class

SetSecurityDescriptorGroup

CSecurityDesc::SetControl

CSecurityDesc::SetDacl

CSecurityDesc::SetOwner

CSecurityDesc::SetSacl

CSecurityDesc::GetGroup