Share via


CSecurityDesc::SetOwner

Sets the owner information of an absolute format security descriptor. It replaces any owner information already present.

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

Parameters

  • Sid
    The CSid object for the security descriptor's new primary owner. This parameter must not be NULL.

  • bDefaulted
    Indicates whether the owner information is derived from a default mechanism. If this value is true, it is default information. The method stores this value as the SE_OWNER_DEFAULTED flag in the SECURITY_DESCRIPTOR_CONTROL structure. If this parameter is zero, the SE_OWNER_DEFAULTED flag is cleared.

Return Value

Returns true on success, false on failure.

Requirements

Header: atlsecurity.h

See Also

Reference

CSecurityDesc Class

CSecurityDesc::SetControl

CSecurityDesc::SetGroup

CSecurityDesc::SetSacl

CSecurityDesc::GetOwner

Other Resources

CSecurityDesc Members