[Solved] Win32 API hook implemenation problem.
I write an application to use with win32 keyboard hook implementation in pure Qt not using external dll.
I face a problem with GetKeyState function. In Visual Studio, it can achieve with like that
GetKeyboardState(keys); //WINUSERAPI SHORT WINAPI GetKeyState(int); @
But when I try it in Qt, return error like that,
keys = new BYTE;
// error: invalid conversion from 'BYTE' to 'int'@
Is GetKeyState(int) need to examine all 256 keys?
How can I solve that problem?
You are using two different functions in your example. The first one is using
the second one is using
GetKeyboardState is using a pointer to bytes and GetKeyState is having an int as argument.
Sorry, I use wrong function. :D
I solve it..