As other posters have mentioned, it is next to impossible to detect a hung process from outside without really having a clear determination of what can be measured to determine hung-ness. Simply examining the PC won't necessarily help, since it will change inside a system call even though that call never returns (for whatever reason)(*). You could rely on a timer (if no data is received/ sent for X minutes, restart the process no matter what) and would get varying degrees of success, but again you would need some way to measure this data from outside the app - perhaps it writes to a log file or whatever.
From a quick hack point of view you will have some luck with the above approach, but for true robustness you'll be better off modifying the app itself, if possible.
(*) - Actually you *might* get some results from running the app under an strace-like utility, and watching to see if any system call loops for "too long" - but you're left with again defining what "too long" means, and of course parsing strace output.