GetSecurityDescriptorLength

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

GetSecurityDescriptorLength函数返回结构有效SECURITY_DESCRIPTOR结构的长度(以字节为单位)。长度包括所有关联结构的长度,例如SIDACL结构。

DWORD GetSecurityDescriptorLength(

PSECURITY_DESCRIPTOR 【pSecurityDescriptor】//安全描述符的地址
); 

参数

【pSecurityDescriptor】

指向函数返回长度的SECURITY_DESCRIPTOR结构。假设SECURITY_DESCRIPTOR结构是有效的。

返回值

如果函数成功,则返回值为SECURITY_DESCRIPTOR结构的长度(以字节为单位)。如果SECURITY_DESCRIPTOR结构无效,则返回值未定义。

备注

安全描述符的最小长度为SECURITY_DESCRIPTOR_MIN_LENGTH。此长度的安全描述符没有关联的SIDACL结构。

也可以看看

GetSecurityDescriptorControl, GetSecurityDescriptorDacl, GetSecurityDescriptorGroup, GetSecurityDescriptorOwner, GetSecurityDescriptorSacl, IsValidSecurityDescriptor, SECURITY_DESCRIPTOR