I am using ShellExecuteEx to run the application. After successfully starting im reading TShellExecuteInfo.hProcess to get the handle of the process started.
I would like to periodically check if the process started by my application is running. Two or more processions with the same name can be executed at the same time, and I want to be sure that my application checks the correct process.
I want this to be possible on Windows systems from Windows 2000 to above.
I know that there is a WinAPI GetProcessId function that does exactly what I want, but does not support Windows 2000.
Thank you for your responses.
Wodzu source share