当我调用 GetNamedSecurityInfo API 并且它成功了,MSDN 指出我需要在 ppSecurityDescriptor
上调用 LocalFree
,但是 ppDacl
和 ppSacl
?
最佳答案
根据 MSDN :
A pointer to a variable that receives a pointer to the owner SID in the security descriptor
A pointer to a variable that receives a pointer to the primary group SID in the returned security descriptor
A pointer to a variable that receives a pointer to the DACL in the returned security descriptor
A pointer to a variable that receives a pointer to the SACL in the returned security descriptor
those parameters will point to the corresponding parameters in the security descriptor returned in ppSecurityDescriptor.
您只需要释放 ppSecurityDescriptor
,因为其他指针指向安全描述符中的字段。
关于c++ - 我需要从 GetNamedSecurityInfo API 中释放哪些返回参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14887038/