Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Watching for a process to start

Name: Anonymous 2008-07-09 12:25

Sup /prog/,

Trying to find an elegant way to watch for when a specific process/application starts in C++. Could of course do something like EnumProcesses() from the PSAPI and go through the list to see if the one I'm looking for is in it... and put that on a timer to poll for it every so often.

But that seems rather messy and polling is evil. Not to mention the process will show up there before it's fully loaded into memory if I'm not mistaken... And I need it to be completely loaded and running.

Anyone know of a better/cleaner way to do it?

Name: Anonymous 2008-07-09 13:52

>>14
Could do that... but then there's the problem of overhead caused by loading (and subsequently unloading) the DLL for every process that starts and not just the one I'm looking for. Not to mention requiring a system restart to take effect. Would be better off using a global hook as >>2 suggested then.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List