简体   繁体   English

我需要从GetNamedSecurityInfo API中解除哪些返回的参数?

[英]Which returned parameters do I need to free from GetNamedSecurityInfo API?

当我调用GetNamedSecurityInfo API并且它成功时,MSDN声明我需要在ppSecurityDescriptor上调用LocalFree ,但是ppDaclppSacl呢?

According to MSDN : 根据MSDN

A pointer to a variable that receives a pointer to the owner SID in the security descriptor 指向变量的指针,该变量接收指向安全描述符中所有者SID的指针

A pointer to a variable that receives a pointer to the primary group SID in the returned security descriptor 指向变量的指针,该变量在返回的安全描述符中接收指向主组SID的指针

A pointer to a variable that receives a pointer to the DACL in the returned security descriptor 指向变量的指针,该变量在返回的安全描述符中接收指向DACL的指针

A pointer to a variable that receives a pointer to the SACL in the returned security descriptor 指向变量的指针,该变量在返回的安全描述符中接收指向SACL的指针

those parameters will point to the corresponding parameters in the security descriptor returned in ppSecurityDescriptor. 这些参数将指向ppSecurityDescriptor中返回的安全描述符中的相应参数。

You only need to free ppSecurityDescriptor as the other pointers point to the fields within the security descriptor. 您只需要释放ppSecurityDescriptor因为其他指针指向安全描述符中的字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM