c# - How to make a process send notification upon its termination -


i wanted programatically determine when process has terminated. searched in various forums , came across pssetcreateprocessnotifyroutine routine.

also, came across similar stackoverflow question:

.net events process executable start.

in accepted answer see query can possibly use. unable quite comprehend query.

can suggest way can implement solution?

basically, need hook windows management api, allows listen started , stopped processes. once wmi send notification program control inside either of (based on answer)

private void processended(object sender, eventarrivedeventargs e) private void processstarted(object sender, eventarrivedeventargs e) 

from arguments able process name.

this how receive notification in managed code. next step send notification script, , depending can use inter-process communication wcf, restfull call, run script parameters etc.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -