Send keys to an application

There is a running application I did not write.
In order to automatize some processes, the application should think the user hit some keys.
So my program in VC++ 6 should "send keys" to the application.

As the application is quite low level, it may catch some interruptions to detect a keyboard input.

What is the way to simulate keyboard input in the application from my program?

What if the application catches directly the interruptions?

Thx (using vc++6 under XP)
[511 byte] By [Mercantilum] at [2007-11-19 18:30:27]
# 1 Re: Send keys to an application
Look at ::SendInput(..) ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/sendinput.asp)

Cheers
golanshahar at 2007-11-10 23:46:33 >
# 2 Re: Send keys to an application
Take a look at this article... ( http://www.codeproject.com/cpp/sendkeys_cpp_Article.asp)
Lodger at 2007-11-10 23:47:44 >