Solved

Keyboard Buffer in Windows

Posted on 1998-07-13
4
643 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

734 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