Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Keyboard Buffer in Windows

Posted on 1998-07-13
4
Medium Priority
?
656 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 200 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

916 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