Help: Start and End programs
- Posted by rolf.schroeder at desy.de May 28, 2003
- 364 views
Hi everyone, I need some 'push' to solve the following (Win32) problem: The following situation: I have two (independent from each other) running programs, i.e., 'Iraq.exe' and 'Iran.exe', these programs don't need any special lib like win32.lib, only the standard window is used by puts()and printf() (and some other functions, which have nothing to do with windowing). A third program, i.e., 'Texan.exe', checks time by time if 'Iraq' and 'Iran' are still creating and writing files. In case 'Texan' concludes that Iraq or Iran don't function anymore properly (i.e. due to network failure), Texan should end the corresponding program and start it again. I found two functions which should do the job, the first is 'ShellExecute()' from 'user32.dll': http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shellexecute.asp and the second is 'TerminateProcess()' from 'kernel32.dll': http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/terminateprocess.asp But I have problems to write the declarations for the Euphoria program 'Texan' in the correct way. If the two above functions are the right selections for this purpose, could someone be so kind and show me how the declarations in Euphoria looks like? Thanks, and have a nice day, Rolf