Take the 2-minute tour ×

windows.h is included, code:

#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)

Compiler is MinGW 4.7

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

This is a relatively recent addition to the relevant enumeration in the Windows API, and perhaps you don't have the required Platform SDK level present - confirm where winnt.h is being picked up from, and track down the right Platform SDK if this value is missing in yours.



Minimum supported client
Windows Vista

Minimum supported server
Windows Server 2008


The Windows SDK for WSrv 2008 is here.

share|improve this answer
add comment

Your Answer


