首页 > TAG信息列表 > dwAttributes

[UAC]C++判断某进程是否有管理员权限

本文只发布于:https://www.cnblogs.com/Icys/p/IsAdminProcess.html BOOL IsAdminProcess(UINT PID) { if (PID <= 0) PID = GetCurrentProcessId(); HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, PID); if (hProcess == NULL) {//要么没