I am trying to send keyboard and mouse input to another
computer in order to be able to control that computer
remotely. Sort of like a Virtual Desktop or VNC but I'm
not concerned with the graphics part.
I put together little client and server apps. The server
app sits on the remote computer. At the local computer,
the client app sits and listens for Keyboard and mouse
messages (WM_KEYDOWN/WM_KEYUP, WM_MOUSEMOVE, etc..). It
then transmits those messages to the server (remote
computer) via TCP. The remote server then translates
those messages into SendInput calls.
It works pretty well but when I'm running certain programs
on the remote server computer, they sort of lock up after
a while, or start acting strangely.
I tried using a message logging tool (uses
SetWindowsHookEx to grab all messages), and it appears
that tons of messages with the value of 255 (0x00FF) are
being generated on the server computer.
I can't seem to figure out what that message means.
Messages are defined in winuser.h, and I see that
WM_KEYDOWN is 256 (0x0100), WM_KEYUP is 257 (0x0101), the
mouse messages are up around 512 (0x0200).
I guess I have a few questions:
1. What is message 255 (0x00FF)?
2. Could it be causing my problems?
3. Is there an alternative way to control another
computer besides the approach I've taken?
Any help is greatly appreciated.
Thanks!
Eli