I want to use SendInput via C++ to lock the computer (Windows+L
). I have created simple keyDown / keyUp functions in which I use SendInput
to send a VK. On keyUp, it adds the flag 0x0002
I can simulate my tab key, my windows key and now I try to lock my computer with a simulated key stroke. I send the following messages:
key down: 0x5B (win key)
key down: 0x4C (L)
key up: 0x4C (L)
key up: 0x5B (win key)
My problem: Nothing happens :-(
Does someone know whats the solution?