如何检查进程是否提高了在Windows 7中使用本机C ++的权限? [英] How to check if a process has elevated privileges in windows 7 using native C++?

查看:155
本文介绍了如何检查进程是否提高了在Windows 7中使用本机C ++的权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检查进程是否在Windows 7中提升了权限(使用本机C ++不是c#/ c ++。net)?

How can I check if a process has elevated privileges in windows 7 (using native C++ not c#/c++.net) ?

我一直在寻找回答很多,但我可以找到使用.Net框架的答案。

I've been looking for an answer for quite sometimes, but all I can find are answers that use the .Net framework.

谢谢!

推荐答案

最简单的方法是调用IsUserAnAdmin函数。如果你需要更多的精度,你也可以使用GetTokenInformation,但在大多数情况下是overkill。

The simplest approach is to call the IsUserAnAdmin function. If you need more precision you can also use GetTokenInformation but in most cases that is overkill.

这篇关于如何检查进程是否提高了在Windows 7中使用本机C ++的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆