Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send E-mail
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00039292
Message ID:
00042045
Views:
66
The return values don't have anything to do with the success of BLAT! Rather, they are the return values from the WinExec() function. That means that they are the Windows Process IDs, and they only exist for the length of time it takes for BLAT to run. The same type of thing happens when you invoke any program using WinExec() or anything else. If you want the return values from BLAT itself (and I'm not sure that there are any), then you may have to write a wrapper as a .BAT file, and check for ERRORLEVEL. That's the only way that DOS programs can return their success to the calling program. Back to the WinExec() function for a second. The returned value is only the PID if it's above 32. If it's 32 or below, then WinExec() itself failed, and the command wasn't run. Sorry this wasn't more clear. /Paul > I have been playing with BLAT, but I am confused about the return > values. > Here is some sample code: > > DECLARE Integer WinExec IN Win32API ; > String cDosCmd, Integer iCmdShow > > * Below is a command that sends E-mail successfully. It returns > 23607. > > ? WinExec('blat readme.txt -s "Good message" -t tacallah@iupui.edu -i > tacallah@iupui.edu', 0) > > * Below is a command that fails, because x.txt does not exist. It > returns > 23879. > > ? WinExec('blat x.txt -s "Bad message" -t tacallah@iupui.edu -i > tacallah@iupui.edu', 0) > > When I do I first command ("Good message") again, it returns 23751. > Doing > the second command ("Bad Message") again gives me 23751. How can tell > programmically when BLAT fails. All return data types are numeric?
Paul Russell
EMail: prussell@fox.nstn.ca
Phone: (902) 499-5043
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform