Hi guys,

I want to disable any key press and mouse move.
For that purpose i use SetWindowsHookEx on WH_KEYBOARD_LL & WH_MOUSE_LL, the problem is, that after I unhook thos functions with UnhookWindowsHookEx, all the keys that were pressed and the mouse moves that were made before i installed my hook, happens.

here is my hook function of the keyboard:

Code:
__declspec(dllexport)LRESULT CALLBACK KeyboardHookProc(      
    int code,
    WPARAM wParam,
    LPARAM lParam
)
{
	if(code==HC_ACTION)
	{
		if(wParam==WM_KEYDOWN || wParam==WM_KEYUP || wParam==WM_SYSKEYDOWN ||
			wParam==WM_SYSKEYUP)
		{
			return 1;
		}

	}

	return CallNextHookEx(hKeyboard,code,wParam,lParam);

}
any idea how to block this operation from occuring even after I unhook the keyboard?

thanks in advance.