Solved

Keyboard Buffer in Windows

Posted on 1998-07-13
4
631 Views
Last Modified: 2013-12-03
How can I find the keyboard buffer in the memory for Windows 95/NT.
I would like to write an application with a timer, it can write something to
keyboard buffer directly without typing any key. I know how to implement it
under DOS. I found that it was different under windows.
0
Comment
Question by:hbh
  • 2
4 Comments
 

Accepted Solution

by:
FabMan earned 100 total points
Comment Utility
You don't necessarily have to write data directly into the keyboard buffer, as you would do in a DOS program. The best way is to change paradigms. Try sending messages WM_KEYUP and WM_KEYDOWN (and WM_SYSKEYUP and WM_SŸSKEYDOWN) to the window you wish to send keyboard input. If you don't know exactly what window it is, maybe you can use functions like GetLastActivePopup() or FindWindow() or FindWindowEx() to help you out.

Good luck!
0
 

Author Comment

by:hbh
Comment Utility
My purpose is to write a program and let it run in background mode. This program can be registed in
HKEY_LOCAL_MACHINE,
"SOFTWARE/Microsoft/Windows/CurrentVersion/RunServices"
so it can be loaded by the system before logon.
I would like to let this program give the password in login dialog box instead of enter
possword on keyboard.
Any good suggestion?
hbh
0
 

Author Comment

by:hbh
Comment Utility
My purpose is to write a program and let it run in background mode. This program can be registed in
HKEY_LOCAL_MACHINE,
"SOFTWARE/Microsoft/Windows/CurrentVersion/RunServices"
so it can be loaded by the system before logon.
I would like to let this program give the password in login dialog box instead of enter
possword on keyboard.
Any good suggestion?
hbh
0
 
LVL 22

Expert Comment

by:nietod
Comment Utility
In general (not always) The best way to "fake" keystrokes is to use the keybd_event() procedure.  It tends to be simpler and better behaved than sending key messages.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now