Solved

Monitor PC activity

Posted on 2004-09-16
7
540 Views
Last Modified: 2010-04-15
I am developing an application that monitor activities on XP/win2k machine. It is a simple application that calculates total idle time and active time and produces a report daily. The machine is considered idle if there's no keyboard or mouse movement.

What's the best way to do the above ? I am trying a method that detects keyboard and mouse activities,  basically capturing windows event such as WM_KEYUP, WM_LBUTTONDBLCLK, etc.. My question is how reliable this method is ? I am using SetWindowsHookEx API call to intercept the windows messages.

Thanks.
0
Comment
Question by:MyQ2004
7 Comments
 
LVL 20

Expert Comment

by:TheAvenger
ID: 12082051
Capturing such activities from all applications is always made with hooks. So you went the right way. Now the only thing you need to refine is what events you want to capture. Maybe you will need WM_KEYDOWN, WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_MOUSEWHEEL because with the events you showed, you will only capture double clicks from the left button, nothing from the right button, nothing from the mouse wheel.
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12082091
this example may help you for a start
http://www.codeproject.com/csharp/globalhook.asp
0
 
LVL 7

Expert Comment

by:jimwasson
ID: 12084235
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:MyQ2004
ID: 12246651
How do I use performance data to check if the user actually used the keyboard or mouse ?
0
 
LVL 18

Accepted Solution

by:
armoghan earned 125 total points
ID: 12247508
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12247556
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12295394
Glad to help
Thanx for accepting
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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