windows.h
包括在内,代码:
#include <windows.h>
int main() {
HANDLE hToken;
DWORD dwSize;
TOKEN_ELEVATION_TYPE pElevationType = TokenElevationTypeDefault;
OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES, &hToken);
GetTokenInformation(hToken, TokenElevationType, pElevationType, sizeof(TOKEN_ELEVATION_TYPE), &dwSize)
}
编译器是 MinGW 4.7