La API piu' utile e completa e' la

SendInput

che, da MSDN

"... synthesizes keystrokes, mouse motions, and button clicks."

Trovi tutto alla pagina

http://msdn.microsoft.com/library/de.../sendinput.asp