Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Win32 process notification

Status
Not open for further replies.

Striker

Computer
May 23, 2001
143
0
0
US
I need to be able to fire a specified event based on the results of new processes starting on the system.
I suppose the real question is whether I can intercept new processes to determine if they meet certain criteria, so I can execute other commands based on the result.

Is this clear?????

TIA...
 
Replies continue below

Recommended for you

Ok, now the big question....

How?

What I want to do is create a simple process that will intercept all calls to the O/S to execute a program. Then, if the program being executed meets certain criteria execute a given command.

Example:

OnNewProcess(PID)
{
If (PID = "this process")
{
DoThisCommand();
}
}
 
OnNewProcess(PID)
{
If (PID = "this process")
{
// send a user message to the class where you want
// DoThisCommand to be carried out
}
}

check out the MSDN document about WM_USER and how to use it.
 
Status
Not open for further replies.
Back
Top