Solved

Monitor PC activity

Posted on 2004-09-16
7
531 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

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…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

810 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