Hi Yaakov
Your problem is that your hook procedure KeyBoardfunc must return 0 not 1.
If you want your code to be corect you must use next source:

LRESULT CALLBACK KeyboardProc (int nCode, WPARAM wParam, LPARAM lParam )
{
MessageBeep(-1);
MessageBeep(-1);
MessageBeep(-1);

return CallNextHookEx(hKBHook, code, wParam, lParam);
}


Martin
e-mail: [email protected]