Solved

Keyboard Buffer in Windows

Posted on 1998-07-13
4
636 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

775 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