If you run a VB app without any UI, will you be able to return a code from
the executalbe which tells you if the process fails. The VB app executes
different processes, and must report back if any of them failed. This will
be used by another application calling it from the command line.
Please help
Thanks
Stephan
I have the same kind of application that runs by itself on a remote machine
every one hour, with no user interface. It sends me an email, should any
error occurs.
Hope this helps.. Let me know if you need more help..
Good Luck..
Khodr
"Stephan Human" <stepha...@hotmail.com> wrote in message
news:OAMexCH...@cppssbbsa02.microsoft.com...
Q129796, HOWTO: 32-Bit App Can Determine When a Shelled Process Ends
Q178357, HOWTO: Set an Error Level from a Visual Basic Application
--
Chris Toney
Network Administrator
Cellular XL Associates
(d.b.a. CellularOne of Mississippi)
>
>A better solution is to use Win32 API calls. Call ExitProces() to report the
>error level when the app terminates. In the calling program, use the
>CreateProcess() API to launch the app instead of VB's Shell() function.
>Retrieve the exit code using GetExitCodeProcess(). Sample code is found in
>two MS KB articles:
>
>Q129796, HOWTO: 32-Bit App Can Determine When a Shelled Process Ends
>
>Q178357, HOWTO: Set an Error Level from a Visual Basic Application
>
One thing to watch when doing this.. Using ExitProcess() short
circuits VB cleanup code. Often not a big issue, but make sure you
set all you object references to Nothing, close files, etc. It can be
a big issue with ADO/databases and probably some other resources.
-Tim