Please see my comments to the question and think about it.
For first step, please try the following: instead of "printing some messages", do the following: send Beep to the speaker (first, make sure it works in a "normal" application), something like:
LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
Beep(440, 400); return CallNextHookEx(hHook, nCode, wParam, lParam);
I'm not quite joking. I an expecting that you might hear the beep on both computers. I already resolved a number of mysterious "not working" problems using this simple trick.
Well, I might be wrong. In this case, we can think about the next step. But please try this first.