I have a Delphi program, A, which runs another Delphi program, B, using CreateProcess (or ShellExecute)
The return code from CreateProcess merely indicates whether the process was successfully created so it is useless when trying to RAISE ERRORS.
The only way I can think of doing it is to have B create a file with an error message ON Exception.
When A detects that the B process is finished, go and look for the B error file, read the error and then RAISE an error with the appropriate E.message.
HOWEVER, There simply has to be an elegant way to do this since this should be a common occurrence.
Thanks in advance,
Tom
The return code from CreateProcess merely indicates whether the process was successfully created so it is useless when trying to RAISE ERRORS.
The only way I can think of doing it is to have B create a file with an error message ON Exception.
When A detects that the B process is finished, go and look for the B error file, read the error and then RAISE an error with the appropriate E.message.
HOWEVER, There simply has to be an elegant way to do this since this should be a common occurrence.
Thanks in advance,
Tom