CSecurityDesc::SetControl

设置安全说明符的控制位。

bool SetControl(
   SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
   SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet 
) throw( );

参数

  • ControlBitsOfInterest
    指示要设置的控制位的 SECURITY_DESCRIPTOR_CONTROL 掩码。 有关可设置的标志的列表,请参阅 SetSecurityDescriptorControl

  • ControlBitsToSet
    一个 SECURITY_DESCRIPTOR_CONTROL 掩码,指示由 ControlBitsOfInterest 掩码指定的控制位的新值。 此参数可以为 ControlBitsOfInterest 参数列出的标志的组合。

返回值

如果成功,则返回 true;如果失败,则返回 false。

备注

此方法仅适用于 Windows 2000 和更高版本,因为它调用了 SetSecurityDescriptorControl

要求

**标头:**atlsecurity.h

请参见

参考

CSecurityDesc Class

CSecurityDesc::SetDacl

CSecurityDesc::SetGroup

CSecurityDesc::SetOwner

CSecurityDesc::SetSacl

CSecurityDesc::GetControl