Link to home
Start Free TrialLog in
Avatar of jrepetto
jrepetto

asked on

How to put characters in the keyboard buffer ?

A few years ago, I had written a TSR that received data from a serial port (barcode reader), then put them into the keyboard buffer (INT 16H, function 5) to fill automatically
a form of a stock management application.

Now this application has moved to Windows 95, and naturally the TSR is not working any longer.
I plan to write a Win32 software that would run besides the stock management application, that would receive data from the serial port.
But I don't know how to send them to the keyboard buffer, so that the stock management form is filled .

Any ideas ?

Thanks for your answers.


J.C. REPETTO
jrepetto@mxmlab.com
ASKER CERTIFIED SOLUTION
Avatar of stsanz
stsanz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jrepetto
jrepetto

ASKER

I have found keyb_event in the Win32 API, but not SendInput. Is it also in the Win32 API ?
Which function is the best to use ?
SendInput is a Win32 API that can be used to send both keyboard and mouse events, but is available only from Win 98, or Win NT with service pack SP3.
Otherwise they are equivalent. Use keybd_event on Win 95.