Re: Setting up a TMessage trap
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 30 Mar 2008 16:34:23 +0200
"battles" <battles@xxxxxxxxxxxxxx> wrote in message
news:dfa11a8e-7fbe-454d-96b9-d9d601f5c121@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a program that is using a timer to scan and determine if
another program has started. I would like to get away from using a
timer. Is there possibly a message trap I could set up to look for
certain messages, such as WM_CREATE, whereby I could upon encountering
do the above scan for the other program. An example would be
appreciated.
If you have source control over the other program, then there are
many easier ways. So I'll assume you don't.
Messages weren't primarily introduced to warn _other_ processes of
things that don't concern them as such, so while there are messages
for repainting and so on, I don't expect a global notification when
any random executable is started, nor do I in fact know of such a
message.
Hooking CreateProcess (and perhaps a few others) would seem to
come in at the exact place you want to, but it's not for the faint
of heart.
Examples through Google.
Groetjes,
Maarten Wiltink
.
- References:
- Setting up a TMessage trap
- From: battles
- Setting up a TMessage trap
- Prev by Date: Setting up a TMessage trap
- Next by Date: Re: Setting up a TMessage trap
- Previous by thread: Setting up a TMessage trap
- Next by thread: Re: Setting up a TMessage trap
- Index(es):
Relevant Pages
|