How to know when calling app exited/stopped
-
I have a little application called updater.exe. This updater gets called by the other application called someapp.exe. Updater receives three arguments 1. calling application (full path of someapp.exe) 2. location of the installer file 3. installing destination folder So when someapp.exe calls updater.exe it immediately exits (it will get overwritten). Because this exiting process isn't instant, updater should check if it's still "alive". How can I do this? Can I get some handle from 1st argument and check if application is still running? Best regards,
Rostfrei
-
I have a little application called updater.exe. This updater gets called by the other application called someapp.exe. Updater receives three arguments 1. calling application (full path of someapp.exe) 2. location of the installer file 3. installing destination folder So when someapp.exe calls updater.exe it immediately exits (it will get overwritten). Because this exiting process isn't instant, updater should check if it's still "alive". How can I do this? Can I get some handle from 1st argument and check if application is still running? Best regards,
Rostfrei
-
I have a little application called updater.exe. This updater gets called by the other application called someapp.exe. Updater receives three arguments 1. calling application (full path of someapp.exe) 2. location of the installer file 3. installing destination folder So when someapp.exe calls updater.exe it immediately exits (it will get overwritten). Because this exiting process isn't instant, updater should check if it's still "alive". How can I do this? Can I get some handle from 1st argument and check if application is still running? Best regards,
Rostfrei
-
I have a little application called updater.exe. This updater gets called by the other application called someapp.exe. Updater receives three arguments 1. calling application (full path of someapp.exe) 2. location of the installer file 3. installing destination folder So when someapp.exe calls updater.exe it immediately exits (it will get overwritten). Because this exiting process isn't instant, updater should check if it's still "alive". How can I do this? Can I get some handle from 1st argument and check if application is still running? Best regards,
Rostfrei
Have the calling process pass a
HANDLE
to itself to the callee. Make sure thisHANDLE
is inheritable and then when you callCreateProcess
to create the callee ensure thebInheritHandles
argument is set to TRUE. The callee can then callWaitForSingleObject
passing in thisHANDLE
to wait until the caller has exited.Steve