Dmitry wrote: >> + BYTE key_state[256]; >> +... >> + result = GetKeyboardState((LPBYTE)&key_state); > the casts in the above code clearly > show that the pointer syntax is wrong there. Nah. It's ugly, but not wrong. key_state == &key_state here. - Dan