如何在C ++中检查帐户是否为admin [英] How to check the account is admin or not in c++
本文介绍了如何在C ++中检查帐户是否为admin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个用户名,我需要检查用户名是否为管理员用户帐户.
如何检查?
任何API.我搜索了但没有得到.
Hi,
i have one username, i need to check that username is admin user account or not.
how to check?
Any API. I searched, but i didn''t get.
推荐答案
也许 [ ^ ]会帮助您吗? :)
Maybe it[^] will help you ? :)
下面的CodeProject文章很好地涵盖了这个主题:
过程强制性级别检查和自我快速入门指南-UAC下的海拔高度
如果通过允许传递任意访问令牌来概括IsUserInAdminGroup,则可以实现所需的功能.
The following CodeProject article covers nicely this subject:
A Quick-Start Guide of Process Mandatory Level Checking and Self-elevation under UAC
If you generalize the IsUserInAdminGroup by allowing an arbitrary access token to be passed, you can achieve what you asked for.
这篇关于如何在C ++中检查帐户是否为admin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文