Getuidx64 Require Administrator Privileges Better
uid_t getuidx64(void) HANDLE hToken; if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) return -1; // ... get TokenUser, convert SID to UID (via cache or LSA)
If you are working directly with x64 assembly, the system call numbers differ between getuid and geteuid . To check for admin privileges, you must use the geteuid syscall. getuidx64 require administrator privileges better
Is this for a or a system administration guide? uid_t getuidx64(void) HANDLE hToken; if (