4

I've been searching over the internet how to retrieve permissions and ownership of a file using win32 api, and yet I have no answer.

I'm new with the win32 api , read some guides from the internet, tried to analyze some code associating with this api and still I'm clueless.

Could you guys help me out with some piece of advice or some directions , tips etc.

I'm sorry that I can't be more specific than that by adding some code, I don't see any reason to import any code of my own since the only remaining function is the one retrieving this information and the rest is simple(User interface and etc).

4

2 回答 2

3

请参阅使用 C++ 检索 NTFS 权限。但是,基本上,您调用GetFileSecurity来获取文件的安全描述符。从中,您可以获得访问控制列表 (ACL) 以及所有者和权限。

于 2012-08-01T08:45:03.900 回答
2

请参阅此示例,该示例使用GetSecurityInfoLookupAccountSid函数查找文件的所有者。

于 2012-08-01T08:47:15.983 回答