问题描述
我一直在互联网上搜索如何使用 win32 api 检索文件的权限和所有权,但我没有答案.
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.
我是 win32 api 的新手,从互联网上阅读了一些指南,试图分析一些代码与此 api 相关联,但我仍然一无所知.
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).
推荐答案
参见 检索 NTFS 权限用 C++.但是,基本上,您调用 GetFileSecurity 获取文件的安全描述符.从中,您可以获得访问控制列表 (ACL) 以及所有者和权限.
See Retrieving NTFS Permissions with C++. But, basically, you call GetFileSecurity to get a security descriptor for the file. From that, you can get the access control list (ACL) and the owner and permissions.
这篇关于C++ 如何通过 win32 api 检索文件权限和所有权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)