I saw IsInRole method but I can't find information on how to use it with C++.
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
The documentation of
IsUSerAnAdmin
explains that it's deprecated since Vista, but points you toCheckTokenMembership
. That should do the job for you.There's a C++ code snippet in this old answer taken from the UACHelpers project on CodePlex.
This code solves your problem. Feel free to use it. It works with SE_GROUP_USE_FOR_DENY_ONLY.
You might try this piece of code. It gives a sketch of what needs to be done: