GetSecurityDescriptorOwner

【勇芳软件工作室】汉化HomePreviousNext

GetSecurityDescriptorOwner函数从安全描述符中检索所有者信息。

BOOL GetSecurityDescriptorOwner(

PSECURITY_DESCRIPTOR 【pSecurityDescriptor】,//安全描述符的地址
PSID 【* pOwner】,//指向所有者安全标识符(SID)的指针的地址
LPBOOL 【lpbOwnerDefaulted】//默认的标志地址
); 

参数

【pSecurityDescriptor】

指向SECURITY_DESCRIPTOR结构,其功能检索的所有者信息。

【pOwner】

指向指向SID结构的指针,该结构在函数返回时标识所有者。(SID是安全标识符。)如果安全描述符不包含所有者,则该函数将由【pOwner】指向的指针设置为NULL,并忽略剩余的输出参数【lpbOwnerDefaulted】.如果安全描述符包含所有者,则该函数将【pOwner】指向的指针设置为安全描述符所有者SID结构的地址,并为【lpbOwnerDefaulted】指向的变量提供有效值。

【lpbOwnerDefaulted】

当函数返回时,将一个标志设置为SECURITY_DESCRIPTOR_CONTROL结构中的SE_OWNER_DEFAULTED标志的值。如果存储在【pOwner】参数指向的变量中的值为NULL,则不设置任何值。

返回值

如果函数成功,返回值不为零。

如果函数失败,返回值为零。要获取扩展错误信息,请调用GetLastError.

也可以看看

GetSecurityDescriptorControl, GetSecurityDescriptorDacl, GetSecurityDescriptorGroup, GetSecurityDescriptorLength, GetSecurityDescriptorSacl, IsValidSecurityDescriptor, SECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL, SetSecurityDescriptorOwner, SID