SetSecurityDescriptorOwner
The SetSecurityDescriptorOwner
function sets the owner information of an absolute-format security descriptor.
It replaces any owner information already present in the security descriptor.
BOOL SetSecurityDescriptorOwner(
PSECURITY_DESCRIPTOR pSecurityDescriptor, |
// address of security
descriptor |
PSID pOwner, |
// address of SID
for owner |
BOOL bOwnerDefaulted |
// flag for default |
); |
|
Parameters
pSecurityDescriptor
Points to the
SECURITY_DESCRIPTOR
pOwner
Points to a SID
bOwnerDefaulted
Specifies a
flag indicating whether the owner information is derived from a default
mechanism. If this flag is TRUE, it is default information. The function stores
this value as the SE_OWNER_DEFAULTED flag in the SECURITY_DESCRIPTOR_CONTROL
Return Values
If the
function succeeds, the return value is nonzero.
If the
function fails, the return value is zero. To get extended error information,
call GetLastError
See Also