Lionel Ulmer lionel.ulmer@free.fr writes:
I have actually no idea what exactly is what Windows is doing there, but this attached patch seems to do the trick. I have no idea if it's correct though (as I do not know if what GetModuleHandle returns is really the same thing as what SetWindowsHookEx expects as an HINSTANCE input).
This doesn't look right, it doesn't make sense to create a system-wide hook without an instance, since in that case there is no way to call the function in other processes. This requires more investigation to find out exactly what Windows does in this case.