Untitled
HANDLE hToken; if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) { TOKEN_ELEVATION elevation; DWORD dwSize; if (GetTokenInformation(hToken, TokenElevation, &elevation, sizeof(elevation), &dwSize)) { isElevated = (elevation.TokenIsElevated != 0); } CloseHandle(hToken); }