Solved

Keyboard Buffer in Windows

Posted on 1998-07-13
4
640 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
ID: 1410010
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
ID: 1410011
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
ID: 1410012
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
ID: 1410013
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…

680 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