Solved

Monitoring KeyStrokes

Posted on 2002-05-29
12
221 Views
Last Modified: 2010-05-02
We need to write an application that monitors every single key stroke made on a computer, but have the monitoring application sitting in the background, completely invisible to the user.  Is there an API available that can help do this?  If so, how do we use it?

Ta.
0
Comment
Question by:Luke_Stephens
  • 4
  • 4
  • 3
  • +1
12 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 7041388
You are after a Keylogger in effect. There are many commercially available applications that do this, also many freeware/shareware ones as well. The basic problem in creating such an application is that you cannot easily create a systemwide hook into the keyboard buffer. You have to have the callback process in a standard dll which cannot be created by VB. However there are a number of standard dlls created for this very purpose. One that I have used succesfully is from http://www.vbaccelerator.com the vbalhook.dll. There are also samples here that can be used to build exactly the sort of application you are interested in.
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7041494
You cna use Hooks

The WH_KEYBOARD and WH_KEYBOARD_LL intercept messages that relate to keyboard input.

The WH_JOURNALRECORD Hook receives mouse, keyboard and other hardware messages from the system.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7041522
Indeed corvanderlinden you can but you still need to use an additional dll to make this systemwide as vb can only handle application wide hooks.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7041789
"Subclass Keyboard and Mouse Events in Other Applications (Version 2.0)"
http://www.freevbcode.com/ShowCode.Asp?ID=1610
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7041795
I knew Ark must have done something like this, I should have checked myself really.
0
 

Author Comment

by:Luke_Stephens
ID: 7041830
On a VB course at the moment, no WinZip, so I can't check that dll out yet.  I'm not ignoring you all though, cheers for your help so far...
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 28

Expert Comment

by:AzraSound
ID: 7041847
The link I pointed you to is done in pure VB
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7041854
If Ark shows up in this thread, he deserves the credit...that man does wonders in "low-level" VB
0
 

Author Comment

by:Luke_Stephens
ID: 7041877
It's in a zip file now mate.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7041949
Aware of that...just offering additional commentary at no charge   ;-)
0
 

Author Comment

by:Luke_Stephens
ID: 7041984
Very kind of you!
0
 

Author Comment

by:Luke_Stephens
ID: 7072103
Cheers mate, sorry for the long silence - I was on a course and this lad wanted to know how to do this.  Don't know if he managed it but I want to close this question!

Luke
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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

706 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

23 Experts available now in Live!

Get 1:1 Help Now