I'm trying to install a global hook. If i issue this command :
hHook = SetWindowsHookEx(WH_KEYBOARD, MouseProc, 0,GetCurrentThreadId());
it works fine, but, of course, this isn't a global hook, it's only a local one. Now, this should be a global hook:
hHook = SetWindowsHookEx(WH_KEYBOARD, MouseProc, 0,0);
but it doesn't seem to work at all.
I'm using Visual C++ 6.0 .
Any ideas anyone, please?
PS I have a problem with the local hook too. It executes twice, i suppose that once is for keydown, and once for keyup, but i don't know how to differentiate these.
hHook = SetWindowsHookEx(WH_KEYBOARD, MouseProc, 0,GetCurrentThreadId());
it works fine, but, of course, this isn't a global hook, it's only a local one. Now, this should be a global hook:
hHook = SetWindowsHookEx(WH_KEYBOARD, MouseProc, 0,0);
but it doesn't seem to work at all.
I'm using Visual C++ 6.0 .
Any ideas anyone, please?
PS I have a problem with the local hook too. It executes twice, i suppose that once is for keydown, and once for keyup, but i don't know how to differentiate these.