Código
si pulso Alt Gr i contiene 2 y data->flags 129
KBDLLHOOKSTRUCT *data = (KBDLLHOOKSTRUCT*)lparam; int i = 1 << data->flags;
Pero luego aquí
Código
KBDLLHOOKSTRUCT *data = (KBDLLHOOKSTRUCT*)lparam; int i = 1 << 129;
i contiene 0

data->flags es un DWORD (unsinged long) por esto probe hacer una conversión aunque creo que da igual.
Código
El i sigue 0.
KBDLLHOOKSTRUCT *data = (KBDLLHOOKSTRUCT*)lparam; int i = 1 << (DWORD)129;
Porque pasa esto?
Saludos