Click to See Complete Forum and Search --> : Get a notification when another process starts up


chamalsl
February 18th, 2005, 02:47 PM
Hi,

I want to write a c++ program which will get a notification when another program is started. For example if MS word is started my application should be notified that MS word is started. I am using windows xp and windows 98.

Is it possible to do this. If so can you please give me an idea on how to do this and what areas that I should learn to do this.

Thanking you,
Chamal.

SirNotApearingOnThisForum
February 20th, 2005, 11:03 AM
I don't think there's a specific API for doing this, but what you can do is search through the processes every 5 seconds or so to see if the application's there. Or, alternatly, you could enumerate the windows and look for the class name of that application.

genossa
February 21st, 2005, 11:10 AM
Hello!

The other more complicated way is hooking CreateProcess () calls.