Ok so I realise this sounds almost exactly like a keylogger, but hear me out first :P

What I am planning on doing is creating a program that will allow me to have 1 instance of a game on monitor 1, another instance on monitor 2, then with two 360 controllers be able to play them both independently on a LAN like setup. Prettymuch turning my PC into a games console.

Essentially what I want to make is a program that catches all input (keyboard, game controller, etc). Then send it to another program (once I am that far sending to the second shouldn't be a problem.

It isn't a problem that the same data is sent to each game instance as they can both have controller settings and it won't interfere with anything, although thinking about it, once the program has been made it wouldn't be difficult to separate the different inputs into each window.

The question is what calls do I need to make? How do you catch data from game controllers? how do you send the inputs to another program?