April 1st, 2011, 09:53 AM
WH_CBT, WH_JOURNALRECORD - best tool for the job
I'm trying to write an application which can track my daily time spent across applications. What I have done so far is:
1) Use WH_Journalrecord along with a few other API functions to read in the active process, window title, etc.,
2) Used VB for the whole code
3) Used a database to log information about the application I'm on, and what keys I'm pressing in it, along with the time stamp for this.
What I have noticed with my current VB code is:
a) It doesn't allow my macros in Excel to run
b) It doesn't allow fast Alt+Tab usage (slows it down drastically)
There are a couple of other performance issues which led me to conclude that its time to write the code in C++
But, before I started, I reviewed some code on the Internet and found some screen recorders (similar purpose as mine, except I want data, and not actual screens) don't use WH_JournalRecord or even WH_CBT.
My question to those with wisdom on this is:
What's the best tool for what I want to accomplish? Which hook will serve my purpose the best? Or would I be writing more efficient code if I decide which applications I want to track and read off their process memory, instead of using hooks?
Thanks in advance!
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.