So I've done some googling and can't work out whether the following is possible.
I am writing a piece of software which gets data using an interface mechanism provided by a third party program. On start up my program tries to connect to the third party program and if that fails then my program does not start. It then polls the third party program (and a background thread) to determine if any data has changed.
My problem comes when the third party application is closed whilst my program is running. For various reasons I can not simply close my software and instead I show a message telling the user they need to restart the third party program before they can continue using parts of the functionality of my program. I do however pause the polling. When the third party program has been started again I need to re-connect to it and continue the polling, however I can not work out how to determine when the third party application has been re-started.
- Is it possible to listen for the program to start? [by name and not by process as the process name is too generic]
- Is there a better alternative?