Got the error :
TOKEN_MANDATORY_LABEL and TokenIntegrityLevel not declared in this scope.
I included windows.h and winnt.h :
#include <Windows.h>
#include <winnt.h>
I can redefine TOKEN_MANDATORY_LABEL:
typedef struct _TOKEN_MANDATORY_LABEL {
SID_AND_ATTRIBUTES Label;
} TOKEN_MANDATORY_LABEL, *PTOKEN_MANDATORY_LABEL;
So the problem is solved for TOKEN_MANDATORY_LABEL, but if I redefine TOKEN_INFORMATION_CLASS for TokenIntegrityLevel (https://learn.microsoft.com/en-us/windows/desktop/api/winnt/ne-winnt-_token_information_class) got the message that TOKEN_INFORMATION_CLASS was already declared. I'm compiling using MinGW :
g++ sandbox.cpp -o sandbox.exe I probably forget to include something.