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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -