I have a Delphi program, A, which uses CreateProcess to call another Delphi program, B.
If B bombs or is terminated to an error I RAISE, A does not see this.
First, the Boolean CreateProcess is of no use because this just reports the success of CreateProcess.
Now, GetExitCodeProcess seems to be the way to do this, however it always brings back the same code, 126. One possible reason is a "Permission Problem."
Studying things a bit leads to the using "nil" definitions for process and thread security in the CreateProcess call: perhaps this default is not "permitting."
So it looks like I need the PROCESS_QUERY_INFORMATION securtiy level in SECURITY_ATTRIBUTES.
Unfortunatly, it appears that you simply can't put "PROCESS_QUERY_INFORMATION" in lieu of the "nil" since this is an integer and pSecurityAttributes type is required.
I've been spending a couple hours trying to figure out how this is done and my "eyes are spinning..."
Thanks in advance,
Tom
If B bombs or is terminated to an error I RAISE, A does not see this.
First, the Boolean CreateProcess is of no use because this just reports the success of CreateProcess.
Now, GetExitCodeProcess seems to be the way to do this, however it always brings back the same code, 126. One possible reason is a "Permission Problem."
Studying things a bit leads to the using "nil" definitions for process and thread security in the CreateProcess call: perhaps this default is not "permitting."
So it looks like I need the PROCESS_QUERY_INFORMATION securtiy level in SECURITY_ATTRIBUTES.
Unfortunatly, it appears that you simply can't put "PROCESS_QUERY_INFORMATION" in lieu of the "nil" since this is an integer and pSecurityAttributes type is required.
I've been spending a couple hours trying to figure out how this is done and my "eyes are spinning..."
Thanks in advance,
Tom