| Newsgroups |
gmane.mail.blat |
| Message-ID |
<[email protected]> |
I have a Delphi program - it creates a batch file with a call to Blat - it executes the batch file with ShellExecute( ... ). Which all works fine.
My problem is that if Blat fails (it did recently because the ISP changed the smtp server name) then I can't get the error fed back into my Delphi program. The ShellExecute( ... ) is non-modal, Delphi sets the batch running and then ignores it and carries on. The return value from ShellExecute relates to getting the batch file started, not to any problems the batch file might have.
I could get the batch to dump the errorlevel code into a file and then get the Delphi program to read the file (after an appropriate delay) - but it's all a bit of a cludge
- is there a better way?