I am trying to completely disable the letter 'a' on the keyboard using lowlevel keyboard hook. The problem is that when i return 0 from keyboardproc the key is not disabled but when i return 1 it gets disabled. I thought that returning from keyboardproc without calling CallNextHookEx blocks the message. Is there any difference between returning 0 and returning 1.
LRESULT CALLBACK LowLevelKeyboardProc(int code, WPARAM wParam, LPARAM lParam) {
KBDLLHOOKSTRUCT* details = (KBDLLHOOKSTRUCT*) lParam;
if(code == HC_ACTION && wParam == WM_KEYDOWN)
{
if(details->vkCode == 0x41)
{
return 1;
}
}
return CallNextHookEx(g_hhkKeyboard, code, wParam, lParam);
}